def rename_node_attribute(topology, old_attr, new_attr):
    """Rename all nodes attributes with a specific name to a new name

    Parameters
    ----------
    topology : Topology
        The topology object
    old_attr : any hashable type
        Old attribute name
    new_attr : any hashable type
        New attribute name

    Example
    -------
    >>> import fnss
    >>> topo = fnss.Topology()
    >>> topo.add_node(1, pos=(0, 0))
    >>> topo.add_node(2, pos=(1, 1))
    >>> topo.nodes(data=True)
    [(1, {'pos': (0, 0)}), (2, {'pos': (1, 1)})]
    >>> fnss.rename_edge_attribute(topo, 'pos', 'coordinates')
    >>> topo.edges(data=True)
    [(1, {'coordinates': (0, 0)}), (2, {'coordinates': (1, 1)})]
    """
    for v in topology.nodes():
        if old_attr in topology.adj[v]:
            topology.node[v][new_attr] = topology.node[v][old_attr]
            del topology.node[v][old_attr]
