original_docstring: 
          This function will loop through the outlet list and
          find the corresponding watersheds using depthfirst search
          algorithm.
          
docstring: This function will loop through the outlet list and
  find the corresponding watersheds using depthfirst search
  algorithm.
docstring_tokens: This function will loop through the outlet list and find the corresponding watersheds using depthfirst search algorithm .
code: def findWatersheds(self, watershedGraph, fieldOutletSubs):
          '''
          This function will loop through the outlet list and
          find the corresponding watersheds using depthfirst search
          algorithm.
          '''
          subsinWS = {}
          wsOutlets = {}
          
          print(fieldOutletSubs)
          # there might be some disruption of numbers, 
          # making the ws no not continuous.
          # I add a counter, ever time, there need to be
          # one append, add one.
          wsctr = 0
          for olid in range(len(fieldOutletSubs)):
              subPurePath = self.dfs_iterative(
                                      watershedGraph,
                                      fieldOutletSubs[olid])       
              # Jusge whether the new watershed is contained
              # in the old paths
              if olid == 0:
                  wsctr = wsctr + 1
                  subsinWS[wsctr] = subPurePath
                  wsOutlets[wsctr] = fieldOutletSubs[olid]
              else:
                  newpathlen = len(subPurePath)
                  for k, v in subsinWS.items():
                      vlen = 0
                      vlen = len(v)
                      if vlen >= newpathlen:
                          if not set(subPurePath).issubset(set(v)):
                              # This means the new one is the subset of the existing one,
                              wsctr = wsctr + 1
                              subsinWS[wsctr] = subPurePath
                              wsOutlets[wsctr] = fieldOutletSubs[olid]
                              break
                          else:
                              break
                      elif vlen < newpathlen:
                          if set(v).issubset(set(subPurePath)):
                              # This means the existing one is the subset of the new one:
                              # replace it with the new one
                              subsinWS[k] = subPurePath
                              wsOutlets[k] = fieldOutletSubs[k]
                              break
                          else:
                              wsctr = wsctr + 1
                              subsinWS[wsctr] = subPurePath
                              wsOutlets[wsctr] = fieldOutletSubs[olid]
                              break
  
                      
                      
  
          return subsinWS
code_tokens: def findWatersheds ( self , watershedGraph , fieldOutletSubs ) : subsinWS = { } wsOutlets = { } print ( fieldOutletSubs ) wsctr = 0 for olid in range ( len ( fieldOutletSubs ) ) : subPurePath = self . dfs_iterative ( watershedGraph , fieldOutletSubs [ olid ] ) if olid == 0 : wsctr = wsctr + 1 subsinWS [ wsctr ] = subPurePath wsOutlets [ wsctr ] = fieldOutletSubs [ olid ] else : newpathlen = len ( subPurePath ) for k , v in subsinWS . items ( ) : vlen = 0 vlen = len ( v ) if vlen >= newpathlen : if not set ( subPurePath ) . issubset ( set ( v ) ) : wsctr = wsctr + 1 subsinWS [ wsctr ] = subPurePath wsOutlets [ wsctr ] = fieldOutletSubs [ olid ] break else : break elif vlen < newpathlen : if set ( v ) . issubset ( set ( subPurePath ) ) : subsinWS [ k ] = subPurePath wsOutlets [ k ] = fieldOutletSubs [ k ] break else : wsctr = wsctr + 1 subsinWS [ wsctr ] = subPurePath wsOutlets [ wsctr ] = fieldOutletSubs [ olid ] break return subsinWS
short_docstring: This function will loop through the outlet list and
  find the corresponding watersheds using depthfirst search
  algorithm.
short_docstring_tokens: This function will loop through the outlet list and find the corresponding watersheds using depthfirst search algorithm .
comment: '''
          This function will loop through the outlet list and
          find the corresponding watersheds using depthfirst search
          algorithm.
          '''$SEP$# there might be some disruption of numbers, $SEP$# making the ws no not continuous.$SEP$# I add a counter, ever time, there need to be$SEP$# one append, add one.$SEP$# Jusge whether the new watershed is contained$SEP$# in the old paths$SEP$# This means the new one is the subset of the existing one,$SEP$# This means the existing one is the subset of the new one:$SEP$# replace it with the new one