def nodeByName(nodes, name):
    for node in nodes:
        if (node.name == name):
            return node
    raise Exception("Node with the name '{}' has not been found.".format(name))
def nodeByName(nodes, name):
    for node in nodes:
        if (node.name == name):
            return node
    raise Exception("Node with the name '{}' has not been found.".format(name))