code: def number_of_unique_magnetic_sites(self, symprec=1e-3, angle_tolerance=5):
          
  
          structure = self.get_nonmagnetic_structure()
  
          sga = SpacegroupAnalyzer(
              structure, symprec=symprec, angle_tolerance=angle_tolerance
          )
  
          symm_structure = sga.get_symmetrized_structure()
  
          num_unique_mag_sites = 0
  
          for group_of_sites in symm_structure.equivalent_sites:
              if group_of_sites[0].specie in self.types_of_magnetic_specie:
                  num_unique_mag_sites += 1
  
          return num_unique_mag_sites
docs: :param symprec (float): same as in SpacegroupAnalyzer
          :param angle_tolerance (float): same as in SpacegroupAnalyzer
          :return (int): Number of symmetrically-distinct magnetic sites present
          in structure.