def base_modified_neighbours(adj_nodes_list, idx_mapping):
    """function maps the node indices to new indices using a mapping
    dictionary.

    Args:
        adj_nodes_list (list): list of list containing the node ids
        idx_mapping (dict): node id to mapped node id

    Returns:
        list: list of list containing the new mapped node ids
    """
    new_adj_nodes_list = []
    for adj_nodes in adj_nodes_list:
        new_adj_nodes = []
        for node in adj_nodes:
            new_adj_nodes.append(idx_mapping[node])        
        new_adj_nodes_list.append(new_adj_nodes)
    
    return new_adj_nodes_list