code: def cleanUpFlow(self, river, world):
          '''Validate that for each point in river is equal to or lower than the
          last'''
          celevation = 1.0
          for r in river:
              rx, ry = r
              relevation = world.layers['elevation'].data[ry, rx]
              if relevation <= celevation:
                  celevation = relevation
              elif relevation > celevation:
                  world.layers['elevation'].data[ry, rx] = celevation
          return rivef cleanUpFlow(self, river, world):
          '''Validate that for each point in river is equal to or lower than the
          last'''
          celevation = 1.0
          for r in river:
              rx, ry = r
              relevation = world.layers['elevation'].data[ry, rx]
              if relevation <= celevation:
                  celevation = relevation
              elif relevation > celevation:
                  world.layers['elevation'].data[ry, rx] = celevation
          return river
docs: Validate that for each point in river is equal to or lower than the
          last