#NEWLINE# def neighbors( self , n ) : #NEWLINE# #INDENT# "Return a list of the nodes connected to the node n.\n\n        Parameters\n        ----------\n        n : node\n           A node in the graph\n\n        Returns\n        -------\n        nlist : list\n            A list of nodes that are adjacent to n.\n\n        Raises\n        ------\n        NetworkXError\n            If the node n is not in the graph.\n\n        Notes\n        -----\n        It is usually more convenient (and faster) to access the\n        adjacency dictionary as G[n]:\n\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_edge('a','b',weight=7)\n        >>> G['a']\n        {'b': {'weight': 7}}\n\n        Examples\n        --------\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_path([0,1,2,3])\n        >>> G.neighbors(0)\n        [1]\n\n        " #NEWLINE# try : #NEWLINE# #INDENT# return list ( self . adj [ self ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise NetworkXError ( ( 'The node %s is not in the graph.' % ( n , ) ) )