

def has_node(self, n):
    'Return True if the graph contains the node n.\n\n        Parameters\n        ----------\n        n : node\n\n        Examples\n        --------\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_path([0,1,2])\n        >>> G.has_node(0)\n        True\n\n        It is more readable and simpler to use\n\n        >>> 0 in G\n        True\n\n        '
    try:
        return (self in self.node)
    except TypeError:
        return False

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingGraph.has_node/VarMisuse@20/175 `n`->`self`