def assign_node_names(G, parcellation):
    """
    Modify nodal attribute "name" for nodes of G, inplace.

    Parameters
    ----------
    G : :class:`networkx.Graph`
    parcellation : list
        ``parcellation[i]`` is the name of node ``i`` in ``G``

    Returns
    -------
    :class:`networkx.Graph`
        graph with nodal attributes modified
    """
    # Assign anatomical names to the nodes
    for i, node in enumerate(G.nodes()):
        G.node[i]['name'] = parcellation[i]
    #
    G.graph['parcellation'] = True
    return G