def from_dict(cls, d):
        """
        Reconstructs the LightStructureEnvironments object from a dict representation of the
        LightStructureEnvironments created using the as_dict method.
        :param d: dict representation of the LightStructureEnvironments object
        :return: LightStructureEnvironments object
        """
        dec = MontyDecoder()
        structure = dec.process_decoded(d['structure'])
        all_nbs_sites = []
        for nb_site in d['all_nbs_sites']:
            site = dec.process_decoded(nb_site['site'])
            if 'image_cell' in nb_site:
                image_cell = np.array(nb_site['image_cell'], np.int)
            else:
                diff = site.frac_coords - structure[nb_site['index']].frac_coords
                rounddiff = np.round(diff)
                if not np.allclose(diff, rounddiff):
                    raise ValueError('Weird, differences between one site in a periodic image cell is not '
                                     'integer ...')
                image_cell = np.array(rounddiff, np.int)
            all_nbs_sites.append({'site': site,
                                  'index': nb_site['index'],
                                  'image_cell': image_cell})
        neighbors_sets = [[cls.NeighborsSet.from_dict(dd=nb_set, structure=structure,
                                                      all_nbs_sites=all_nbs_sites)
                           for nb_set in site_nb_sets] if site_nb_sets is not None else None
                          for site_nb_sets in d['neighbors_sets']]
        return cls(strategy=dec.process_decoded(d['strategy']),
                   coordination_environments=d['coordination_environments'],
                   all_nbs_sites=all_nbs_sites,
                   neighbors_sets=neighbors_sets,
                   structure=structure,
                   valences=d['valences'])
Reconstructs the LightStructureEnvironments object from a dict representation of the
        LightStructureEnvironments created using the as_dict method.
        :param d: dict representation of the LightStructureEnvironments object
        :return: LightStructureEnvironments object