code: def icohpvalue(self, spin=Spin.up):
          
          if not self.is_spin_polarized and spin == Spin.down:
              raise ValueError("The calculation was not performed with spin polarization")
  
          return self._icohp[spin]
docs: Args:
              spin: Spin.up or Spin.down
          Returns:
              icohpvalue (float) corresponding to chosen spin