def node_name(graph, node):
    """Returns the name given to the node in the generated Python code"""
    if graph[node]['data']['title'] == 'Input':
        return 'input_' + node
    elif graph[node]['data']['title'] == 'Output':
        return 'output_' + node
    else:
        return 'layer_' + node