code: def get_cohp(self, spin=None, integrated=False):
          
          if not integrated:
              populations = self.cohp
          else:
              populations = self.icohp
  
          if populations is None:
              return None
          elif spin is None:
              return populations
          else:
              if isinstance(spin, int):
                  spin = Spin(spin)
              elif isinstance(spin, str):
                  s = {"up": 1, "down": -1}[spin.lower()]
                  spin = Spin(s)
              return {spin: populations[spin]}
docs: Returns the COHP or ICOHP for a particular spin.
  
          Args:
              spin: Spin. Can be parsed as spin object, integer (-1/1)
                  or str ("up"/"down")
              integrated: Return COHP (False) or ICOHP (True)
  
          Returns:
              Returns the CHOP or ICOHP for the input spin. If Spin is
              None and both spins are present, both spins will be returned
              as a dictionary.