code: def process_files_in_tar(
      target_size, label, tar_handle, file_list, outpath
  ):
      pair_list = []
      if not os.path.exists(outpath):
          # This avoids race conditions that sometimes happen when doing these
          # checks in parallel
          try:
              os.makedirs(outpath)
          except OSError:
              pass
      for fobj in file_list:
          fname = os.path.join(outpath, fobj.name)
          if not os.path.exists(fname):
              transform_and_save(target_size, tar_handle, fobj, fname)
          pair_list.append((fname, label))
      return pair_list
  
imports: from builtins import str, zip
  from configargparse import ArgParser
  from itertools import repeat
  from neon import logger
  from neon.util.persist import ensure_dirs_exist
  from PIL import Image
  import logging
  import multiprocessing
  import numpy
  import os
  import re
  import shutil
  import tarfile
  import tqdm
  import zlib
label_desc: Use image node_id 2 for calling a global function with example usage: process_files_in_tar(target_size, label, tar_handle, file_list, outpath) and returns: pair_list