# Path: robograph/datamodel/base/exceptions.py
# class NodeOutputLabelUndefinedError(Exception):
# class GraphError(Exception):
# class NodeConnectionError(GraphError):
# class NodeDeletionError(GraphError):
# class StopGraphExecutionSignal(Exception):
# class GraphExecutionError(GraphError):


import logging
import traceback
import networkx as nx
from robograph.datamodel.base import exceptions
        return self._nxgraph

    @property
    def name(self):
        return self._name

    def add_node(self, node):
        """
        Adds the specified node to the graph
        :param node: datamodel.base.node.Node instance
        :return: None
        """
        self._nxgraph.add_node(node)

    def add_nodes(self, sequence_of_nodes):
        """
        Adds the specified collection of nodes to the graph
        :param sequence_of_nodes: collections of datamodel.base.node.Node instances
        :return: None
        """
        for node in sequence_of_nodes:
            self.add_node(node)

    def remove_node(self, node):
        """
        Removes the specified node from the graph
        :param node: a datamodel.base.node.Node instance
        :return: None
        """
        if not self._nxgraph.has_node(node):

# Path: robograph/datamodel/base/exceptions.py
# class NodeOutputLabelUndefinedError(Exception):
# class GraphError(Exception):
# class NodeConnectionError(GraphError):
# class NodeDeletionError(GraphError):
# class StopGraphExecutionSignal(Exception):
# class GraphExecutionError(GraphError):


# Path: robograph/datamodel/base/graph.py
import logging
import traceback
import networkx as nx
from robograph.datamodel.base import exceptions

        return self._nxgraph

    @property
    def name(self):
        return self._name

    def add_node(self, node):
        """
        Adds the specified node to the graph
        :param node: datamodel.base.node.Node instance
        :return: None
        """
        self._nxgraph.add_node(node)

    def add_nodes(self, sequence_of_nodes):
        """
        Adds the specified collection of nodes to the graph
        :param sequence_of_nodes: collections of datamodel.base.node.Node instances
        :return: None
        """
        for node in sequence_of_nodes:
            self.add_node(node)

    def remove_node(self, node):
        """
        Removes the specified node from the graph
        :param node: a datamodel.base.node.Node instance
        :return: None
        """
        if not self._nxgraph.has_node(node):

            raise exceptions.NodeDeletionError('Graph does not contain this node')