<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rivermap_update(self, river, water_flow, rivermap, precipitations):
 """Update the rivermap with the rainfall that is to become the waterflow"""


        isSeed = True
        px, py = (0, 0)
        for x, y in river:
            if isSeed:
                rivermap[y, x] = water_flow[y, x]
                isSeed = False
            else:
                rivermap[y, x] = precipitations[y, x] + rivermap[py, px]
            px, py = x, y