<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def mu_so(species, motif, spin_state):
 """ 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 """

        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