code: def from_dict(cls, d):
          
          return Dos(d["efermi"], d["energies"],
                     {Spin(int(k)): v
                      for k, v in d["densities"].items()})
docs: Returns Dos object from dict representation of Dos.