code: def verify_all_same_orientation(folder):
      nii_files = [
          join_paths(folder, nii_path)
          for nii_path in os.listdir(folder)
          if os.path.isfile(join_paths(folder, nii_path))
          and nii_path.endswith(".nii.gz")
      ]
      orientations = []
      for n in nii_files:
          img = nib.load(n)
          affine = img.affine
          orientation = nib.aff2axcodes(affine)
          orientations.append(orientation)
      orientations = np.array(orientations)
      unique_orientations = np.unique(orientations, axis=0)
      all_same = len(unique_orientations) == 1
      return all_same, unique_orientations
  
file_path: PaddleSeg/contrib/MedicalSeg/tools/preprocess_utils/integrity_checks.py
imports: import os
  import json
  import numpy
  import SimpleITK
  import nibabel
  from multiprocessing import Pool
  from .load_image import load_series
  from .path_utils import join_paths
label_desc: Use image node_id 1 for calling a global function with example usage: verify_all_same_orientation(folder) and returns: all_same,  unique_orientations