def METHOD_NAME(d_molden, restricted=False):
    mapping = {}
    start = 0
    ao_start = 0
    for atom_i in np.unique(d_molden['obasis']['shell_map']):
        num_shell = np.count_nonzero(d_molden['obasis']['shell_map'] == atom_i)
        atom_shell_types = d_molden['obasis']['shell_types'][start: start+num_shell]
        start += num_shell
        shell_mapping = shell_sequence_mapping(atom_shell_types)