code: def copy_dir(input_dir, destination_dir, num_threads):
      """
      Copy contents of one directory to the specified destination directory
      using the number of threads to speed up the copy. When the data is
      copied successfully, we create a copy_complete file in the
      destination_dir folder to mark the completion. If the destination_dir
      folder already exists and has the copy_complete file, we don't
      copy the file.
  
      useful for copying datasets like ImageNet to speed up dataloader.
      Using 20 threads for imagenet takes about 20 minutes to copy.
  
      Returns:
          destination_dir (str): directory where the contents were copied
      """
      # remove the backslash if user added it
      data_name = input_dir.strip("/").split("/")[-1]
      if "SLURM_JOBID" in os.environ:
          destination_dir = get_slurm_dir(destination_dir)
      destination_dir = f"{destination_dir}/{data_name}"
      makedir(destination_dir)
      complete_flag = f"{destination_dir}/copy_complete"
      if g_pathmgr.isfile(complete_flag):
          logging.info(
              f"Found Data already copied: {destination_dir}..."
          )
          return destination_dir
      logging.info(
          f"Copying {input_dir} to dir {destination_dir} using {num_threads} threads"
      )
      # We have to do multi-threaded rsync to speed up copy.
      cmd = (
          f"ls -d {input_dir}/* | parallel -j {num_threads} --will-cite "
          f"rsync -ruW --inplace {{}} {destination_dir}"
      )
      os.system(cmd)
      g_pathmgr.open(complete_flag, "a").close()
      logging.info("Copied to local directory")
      return destination_dir, destination_dir
  
imports: import json
  import logging
  import os
  import pickle
  import re
  import shutil
  import time
  from urllib.parse import urlparse
  import numpy
  import pandas
  import yaml
  from iopath.common.download import download
  from iopath.common.file_io import file_lock, g_pathmgr
  from vissl.utils.slurm import get_slurm_dir
label_desc: Use image node_id 11 for calling a global function with example usage: copy_dir(input_dir, destination_dir, num_threads) and returns: destination_dir,  destination_dir, destination_dir