code: def mu_so(species, motif, spin_state):
          
          try:
              sp = get_el_sp(species)
              n = sp.get_crystal_field_spin(coordination=motif, spin_config=spin_state)
              # calculation spin-only magnetic moment for this number of unpaired spins
              return np.sqrt(n * (n + 2))
          except AttributeError:
              return None
docs: Calculates the spin-only magnetic moment for a
          given species. Only supports transition metals.
  
          :param species: str or Species
          :param motif: "oct" or "tet"
          :param spin_state: "high" or "low"
          :return: spin-only magnetic moment in Bohr magnetons