

def neighbors(self, n):
    "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        "
    try:
        return list(self.adj[n])
    except KeyError:
        raise NetworkXError(('The node %s is not in the graph.' % (self,)))

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingGraph.neighbors/VarMisuse@42/396 `n`->`self`