(self, label, attributes)
return node
Add node to graph.

        Args:
            label: (str) Label for the node.
            attributes: (dict) Attributes to add to node.

        Returns:
              Instance of Node object.
Add node to graph.
Add node to graph .
def add_node(self, label, attributes):
        """Add node to graph.

        Args:
            label: (str) Label for the node.
            attributes: (dict) Attributes to add to node.

        Returns:
              Instance of Node object.
        """
        if not attributes:
            attributes = {}

        node = Node(label, attributes)
        node.set_attribute('id', node.id)
        if node.id not in self._nodes:
            self._nodes[node.id] = node
        return node
def add_node ( self , label , attributes ) : if not attributes : attributes = { } node = Node ( label , attributes ) node . set_attribute ( 'id' , node . id ) if node . id not in self . _nodes : self . _nodes [ node . id ] = node return node