code: def crop_coco(args):
      """
      Dataset curation,crop data and transform the format of label
  
      Parameters
      ----------
      ann_base_path: str, Annotations base path
      """
      crop_path = os.path.join(
          args.download_dir,
          "./crop{:d}".format(int(args.instance_size)),
      )
      if not os.path.isdir(crop_path):
          makedirs(crop_path)
  
      for dataType in ["val2017", "train2017"]:
          set_crop_base_path = os.path.join(crop_path, dataType)
          set_img_base_path = os.path.join(args.download_dir, dataType)
  
          annFile = "{}/annotations/instances_{}.json".format(
              args.download_dir, dataType
          )
          coco = COCO(annFile)
          n_imgs = len(coco.imgs)
          with futures.ProcessPoolExecutor(
              max_workers=args.num_threads
          ) as executor:
              fs = [
                  executor.submit(
                      crop_img,
                      coco.loadImgs(id)[0],
                      coco.loadAnns(
                          coco.getAnnIds(imgIds=id, iscrowd=None)
                      ),
                      set_crop_base_path,
                      set_img_base_path,
                      args.instance_size,
                  )
                  for id in coco.imgs
              ]
              for i, f in enumerate(futures.as_completed(fs)):
                  # Write progress to error so that it can be seen
                  printProgress(
                      i,
                      n_imgs,
                      prefix=dataType,
                      suffix="Done ",
                      barLength=40,
                  )
      print("done")
  
file_path: gluon-cv/scripts/datasets/coco_tracking.py
imports: import argparse
  import zipfile
  import os
  from concurrent import futures
  import time
  import json
  import numpy
  from gluoncv.utils import download, makedirs
  from gluoncv.data.mscoco.utils import try_import_pycocotools
  from gluoncv.utils.filesystem import try_import_cv2
  from gluoncv.utils.data.tracking import crop_like_SiamFC, printProgress
label_desc: Use image node_id 4 for calling a global function with example usage: crop_coco(args) without return types