code: def slice_data(
      image_dir,
      dataset_json_path,
      output_dir,
      slice_size,
      overlap_ratio,
  ):
      try:
          from sahi.scripts.slice_coco import slice
      except Exception as e:
          raise RuntimeError(
              "Unable to use sahi to slice images, please install sahi, for example: `pip install sahi`, see https://github.com/obss/sahi"
          )
      tqdm.write(
          f" slicing for slice_size={slice_size}, overlap_ratio={overlap_ratio}"
      )
      slice(
          image_dir=image_dir,
          dataset_json_path=dataset_json_path,
          output_dir=output_dir,
          slice_size=slice_size,
          overlap_ratio=overlap_ratio,
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: slice_data(image_dir, dataset_json_path, output_dir, slice_size, overlap_ratio) without return types