docs: def GetNextNode(self, modes, innode):
          """GetNextNode returns the outnode that matches an element from
          the modes list, starting at the given innode.
          This method isnt actually used, its just a helper method for
          debugging purposes.
  
          """
          nodes = N.where(self.innodes == innode)
  
          ## If there's no entry for the given innode, return -1
          if nodes[0].size == 0:
              return -1
  
          ## If we don't match anything in the modes list, we find the
          ## outnode corresponding the the string 'default'
          defaultindex = N.where(self.keywords[nodes] == 'default')
  
          if len(defaultindex[0]) != 0:
              outnode = self.outnodes[nodes[0][defaultindex[0]]]
  
          ## Now try and match one of the strings in the modes list with
          ## the keywords corresponding to the list of entries with the given
          ## innode
          for mode in modes:
              result = self.keywords[nodes].count(mode)
              if result != 0:
                  index = N.where(self.keywords[nodes]==mode)
                  outnode = self.outnodes[nodes[0][index[0]]]
  
  
          ## Return the outnode corresponding either to the matched mode,
          ## or to 'default'
          return outnode