def _update_nodes(model, starting_id_dict, nid, nid_map):
    """updates the nodes"""
    if 'nid' in starting_id_dict and nid is not None:
        for nid, node in sorted(model.nodes.items()):
            nid_new = nid_map[nid]
            node.nid = nid_new
