# Path: robograph/datamodel/base/graph.py
# class Graph:
#     def __init__(self, name, nodes=None):
#     def root_node(self):
#     def nodes(self):
#     def edges(self):
#     def nxgraph(self):
#     def name(self):
#     def add_node(self, node):
#     def add_nodes(self, sequence_of_nodes):
#     def remove_node(self, node):
#     def remove_nodes(self, sequence_of_nodes):
#     def connect(self, node_from, node_to, output_label):
#     def has_isles(self):
#     def execute(self, result_label="result"):
#     def reset(self):
#     def __repr__(self):
#     def __len__(self):
# 
# Path: robograph/datamodel/base/node.py
# class Node:
#     def __init__(self, **args):
#     def name(self):
#     def requirements(self):
#     def parameters(self):
#     def output_label(self):
#     def input(self, context):
#     def set_output_label(self, output_label):
#     def output(self):
#     def execute(self):
#     def reset(self):
#     def __repr__(self):
# 
# 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 pytest
from robograph.datamodel.base import graph, node, exceptions


# Utilities


class Identity(node.Node):
    _reqs = []


class WithParameters(node.Node):
    _reqs = []

    def __init__(self, **args):
        node.Node.__init__(self, **args)
        self._params.update(args)


def make_a_graph_with_isles():
    root = Identity(name='root')
    med1 = Identity(name='med1')
    med2 = Identity(name='med2')
    leaf1 = Identity(name='leaf1')
    leaf2 = Identity(name='leaf2')

# Path: robograph/datamodel/base/graph.py
# class Graph:
#     def __init__(self, name, nodes=None):
#     def root_node(self):
#     def nodes(self):
#     def edges(self):
#     def nxgraph(self):
#     def name(self):
#     def add_node(self, node):
#     def add_nodes(self, sequence_of_nodes):
#     def remove_node(self, node):
#     def remove_nodes(self, sequence_of_nodes):
#     def connect(self, node_from, node_to, output_label):
#     def has_isles(self):
#     def execute(self, result_label="result"):
#     def reset(self):
#     def __repr__(self):
#     def __len__(self):
# 
# Path: robograph/datamodel/base/node.py
# class Node:
#     def __init__(self, **args):
#     def name(self):
#     def requirements(self):
#     def parameters(self):
#     def output_label(self):
#     def input(self, context):
#     def set_output_label(self, output_label):
#     def output(self):
#     def execute(self):
#     def reset(self):
#     def __repr__(self):
# 
# 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/tests/test_graph.py
import pytest
from robograph.datamodel.base import graph, node, exceptions



# Utilities


class Identity(node.Node):
    _reqs = []


class WithParameters(node.Node):
    _reqs = []

    def __init__(self, **args):
        node.Node.__init__(self, **args)
        self._params.update(args)


def make_a_graph_with_isles():
    root = Identity(name='root')
    med1 = Identity(name='med1')
    med2 = Identity(name='med2')
    leaf1 = Identity(name='leaf1')
    leaf2 = Identity(name='leaf2')

    g = graph.Graph('testgraph', [leaf1, med1, med2, leaf2, root])