code: def standardize_cell(cell,
                       to_primitive=False,
                       no_idealize=False,
                       symprec=1e-5,
                       angle_tolerance=-1.0):
      
      _set_no_error()
  
      lattice, _positions, _numbers, _ = _expand_cell(cell)
      if lattice is None:
          return None
  
      # Atomic positions have to be specified by scaled positions for spglib.
      num_atom = len(_positions)
      positions = np.zeros((num_atom * 4, 3), dtype='double', order='C')
      positions[:num_atom] = _positions
      numbers = np.zeros(num_atom * 4, dtype='intc')
      numbers[:num_atom] = _numbers
      num_atom_std = spg.standardize_cell(lattice,
                                          positions,
                                          numbers,
                                          num_atom,
                                          to_primitive * 1,
                                          no_idealize * 1,
                                          symprec,
                                          angle_tolerance)
      _set_error_message()
  
      if num_atom_std > 0:
          return (np.array(lattice.T, dtype='double', order='C'),
                  np.array(positions[:num_atom_std], dtype='double', order='C'),
                  np.array(numbers[:num_atom_std], dtype='intc'))
      else:
          return None
docs: Return standardized cell.
  
      Args:
          cell, symprec, angle_tolerance:
              See the docstring of get_symmetry.
          to_primitive:
              bool: If True, the standardized primitive cell is created.
          no_idealize:
              bool: If True,  it is disabled to idealize lengths and angles of
                    basis vectors and positions of atoms according to crystal
                    symmetry.
      Return:
          The standardized unit cell or primitive cell is returned by a tuple of
          (lattice, positions, numbers).
          If it fails, None is returned.