Write the definition of the function "accumulated_sums" that returns the accumulated sums of the numbers in "nbrs," with specific behavior.