nodes: 0, module; 1, function_definition; 2, function_name:nearest; 3, parameters; 4, block; 5, identifier:self; 6, identifier:nodes; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, expression_statement; 11, for_statement; 12, comment:# FIXME: raise an exception if nearest is None ?; 13, return_statement; 14, comment:"""Get the node closest to this one from the given list of nodes.
  
          :param nodes: The list of nodes to search. All of these nodes must
              belong to the same module as this one. The list should be
              sorted by the line number of the nodes, smallest first.
          :type nodes: iterable(NodeNG)
  
          :returns: The node closest to this one in the source code,
              or None if one could not be found.
          :rtype: NodeNG or None
          """; 15, assignment; 16, assignment; 17, assignment; 18, identifier:node; 19, identifier:nodes; 20, block; 21, subscript; 22, identifier:myroot; 23, call; 24, identifier:mylineno; 25, attribute; 26, identifier:nearest; 27, expression_list; 28, assert_statement; 29, expression_statement; 30, if_statement; 31, if_statement; 32, identifier:nearest; 33, integer:0; 34, attribute; 35, argument_list; 36, identifier:self; 37, identifier:fromlineno; 38, None; 39, integer:0; 40, comparison_operator:node.root() is myroot; 41, parenthesized_expression; 42, assignment; 43, comparison_operator:node.fromlineno > mylineno; 44, block; 45, comparison_operator:lineno > nearest[1]; 46, block; 47, identifier:self; 48, identifier:root; 49, call; 50, identifier:myroot; 51, binary_operator:"nodes %s and %s are not from the same module" % (self, node); 52, identifier:lineno; 53, attribute; 54, attribute; 55, identifier:mylineno; 56, break_statement; 57, identifier:lineno; 58, subscript; 59, expression_statement; 60, attribute; 61, argument_list; 62, string:"nodes %s and %s are not from the same module"; 63, tuple; 64, identifier:node; 65, identifier:fromlineno; 66, identifier:node; 67, identifier:fromlineno; 68, identifier:nearest; 69, integer:1; 70, assignment; 71, identifier:node; 72, identifier:root; 73, identifier:self; 74, identifier:node; 75, identifier:nearest; 76, expression_list; 77, identifier:node; 78, identifier:lineno
code: def nearest(self, nodes):
          """Get the node closest to this one from the given list of nodes.
  
          :param nodes: The list of nodes to search. All of these nodes must
              belong to the same module as this one. The list should be
              sorted by the line number of the nodes, smallest first.
          :type nodes: iterable(NodeNG)
  
          :returns: The node closest to this one in the source code,
              or None if one could not be found.
          :rtype: NodeNG or None
          """
          myroot = self.root()
          mylineno = self.fromlineno
          nearest = None, 0
          for node in nodes:
              assert node.root() is myroot, (
                  "nodes %s and %s are not from the same module" % (self, node)
              )
              lineno = node.fromlineno
              if node.fromlineno > mylineno:
                  break
              if lineno > nearest[1]:
                  nearest = node, lineno
          # FIXME: raise an exception if nearest is None ?
          return nearest[0]