code: def get_rot(slab):
      
      new_z = get_mi_vec(slab)
      a, b, c = slab.lattice.matrix
      new_x = a / np.linalg.norm(a)
      new_y = np.cross(new_z, new_x)
      x, y, z = np.eye(3)
      rot_matrix = np.array([np.dot(*el) for el in
                             itertools.product([x, y, z],
                                               [new_x, new_y, new_z])]).reshape(3, 3)
      rot_matrix = np.transpose(rot_matrix)
      sop = SymmOp.from_rotation_and_translation(rot_matrix)
      return sop
docs: Gets the transformation to rotate the z axis into the miller index