api/csv_to_graph.py
def add_nodes(nodes, graph):
    """Add the nodes to the graph and return a dictionary which maps ids as read
    from the csv data files to the ids as assigned by igraph.
    """
    graph.add_vertices(nodes)
    idmap = {v['name']: v.index for v in graph.vs}
    return idmap
Add the nodes to the graph and return a dictionary which maps ids as read
    from the csv data files to the ids as assigned by igraph.
    
Add the nodes to the graph and return a dictionary which maps ids as read
from the csv data files to the ids as assigned by igraph.
Add the nodes to the graph and return a dictionary which maps ids as read from the csv data files to the ids as assigned by igraph .
def add_nodes(nodes, graph):
    graph.add_vertices(nodes)
    idmap = {v['name']: v.index for v in graph.vs}
    return idmap
def add_nodes ( nodes , graph ) : graph . add_vertices ( nodes ) idmap = { v [ 'name' ] : v . index for v in graph . vs } return idmap
Add the nodes to the graph and return a dictionary which maps ids as read
from the csv data files to the ids as assigned by igraph.
Add the nodes to the graph and return a dictionary which maps ids as read from the csv data files to the ids as assigned by igraph .
"""Add the nodes to the graph and return a dictionary which maps ids as read
    from the csv data files to the ids as assigned by igraph.
    """
nodes
graph