code: def verify_contains_only_expected_labels(
      itk_img: str, valid_labels: (tuple, list)
  ):
      img_npy, _, _ = load_series(itk_img)
      uniques = np.unique(img_npy)
      invalid_uniques = [i for i in uniques if i not in valid_labels]
      if len(invalid_uniques) == 0:
          r = True
      else:
          r = False
      return r, invalid_uniques
  
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 3 for calling a global function with example usage: verify_contains_only_expected_labels(itk_img, valid_labels) and returns: r,  invalid_uniques