def get_unique_el_mapping(data_list):
    """Map each unique element in the data list to a number/index.
    """
    key2idx = {el: idx for idx, el in enumerate(set(data_list))}
    idx2key = {v: k for k, v in key2idx.items()}

    for idx in idx2key.keys():
        assert isinstance(idx, int)

    return key2idx, idx2key