code: def from_dict(cls, d):
          
          atoms_n_occu = {}
          for sp_occu in d["species"]:
              if "oxidation_state" in sp_occu and Element.is_valid_symbol(
                      sp_occu["element"]):
                  sp = Specie.from_dict(sp_occu)
              elif "oxidation_state" in sp_occu:
                  sp = DummySpecie.from_dict(sp_occu)
              else:
                  sp = Element(sp_occu["element"])
              atoms_n_occu[sp] = sp_occu["occu"]
          props = d.get("properties", None)
          return cls(atoms_n_occu, d["xyz"], properties=props)
docs: Create Site from dict representation