docs: def as_ppmodel(cls, obj):
          """
          Constructs an instance of PPModel from obj.
  
          Accepts obj in the form:
              * PPmodel instance
              * string. e.g "godby:12.3 eV", "linden".
          """
          if isinstance(obj, cls):
              return obj
  
          # obj is a string
          if ":" not in obj:
              mode, plasmon_freq = obj, None
          else:
              # Extract mode and plasmon_freq
              mode, plasmon_freq = obj.split(":")
              try:
                  plasmon_freq = float(plasmon_freq)
              except ValueError:
                  plasmon_freq, unit = plasmon_freq.split()
                  plasmon_freq = units.Energy(float(plasmon_freq), unit).to("Ha")
  
          return cls(mode=mode, plasmon_freq=plasmon_freq)