code: def find_primitive(cell, symprec=1e-5):
      
      lattice, positions, numbers = spg.find_primitive(cell.totuple(), symprec)
      if lattice is None:
          return None
      else:
          return Atoms(numbers=numbers,
                       scaled_positions=positions,
                       cell=lattice,
                       pbc=True)
docs: A primitive cell is searched in the input cell. When a primitive
      cell is found, an object of Atoms class of the primitive cell is
      returned. When not, None is returned.