code: def copy_data_to_local(
      input_files,
      destination_dir,
      num_threads=40,
      tmp_destination_dir=None,
  ):
      """
      Iteratively copy the list of data to a destination directory.
      Each data to copy could be a single file or a directory.
  
      Returns:
          output_file (str): the new path of the file. If there were
                             no files to copy, simply return the input_files
          destination_dir (str): the destination dir that was actually used
      """
      # it might be possible that we don't use the labels and hence don't have
      # label files. In that case, we return the input_files itself as we have
      # nothing to copy.
      if len(input_files) > 0:
          output_files = []
          for item in input_files:
              if isinstance(item, list):
                  copied_file, output_dir = copy_data_to_local(
                      item,
                      destination_dir,
                      num_threads,
                      tmp_destination_dir,
                  )
              else:
                  copied_file, output_dir = copy_data(
                      item,
                      destination_dir,
                      num_threads,
                      tmp_destination_dir,
                  )
              output_files.append(copied_file)
          return output_files, output_dir
      return input_files, 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 13 for calling a global function with example usage: copy_data_to_local(input_files, destination_dir, num_threads, tmp_destination_dir) and returns: input_files,  destination_dir, output_files,  output_dir