code: def crop(
      raw_data_dir,
      cropped_output_dir,
      data_json="dataset.json",
      train_images_dir="imagesTr",
      train_labels_dir="labelsTr",
      override=False,
      num_threads=8,
  ):
      os.makedirs(cropped_output_dir, exist_ok=True)
      if override and os.path.isdir(cropped_output_dir):
          shutil.rmtree(cropped_output_dir)
          os.makedirs(cropped_output_dir, exist_ok=True)
  
      lists, _ = create_lists_from_splitted_dataset(
          raw_data_dir,
          data_json=data_json,
          train_images_dir=train_images_dir,
          train_labels_dir=train_labels_dir,
      )
  
      imgcrop = ImageCropper(cropped_output_dir, num_threads)
      imgcrop.run_cropping(lists, overwrite_existing=override)
      shutil.copy(
          join_paths(raw_data_dir, data_json), cropped_output_dir
      )
  
imports: import os
  import json
  import shutil
  import pickle
  import numpy
  import SimpleITK
  from scipy.ndimage import binary_fill_holes
  from multiprocessing import Pool
  from collections import OrderedDict
  from .path_utils import join_paths
label_desc: Use image node_id 1 for calling a global function with example usage: crop(raw_data_dir, cropped_output_dir, data_json, train_images_dir, train_labels_dir, override, num_threads) without return types