code: def __init__(
      self, input_dir, out_dir, target_size=256, overwrite=False
  ):
      np.random.seed(0)
  
      self.orig_out_dir = out_dir
      self.out_dir = os.path.join(out_dir, "i1k-extracted")
      self.input_dir = (
          os.path.expanduser(input_dir)
          if input_dir is not None
          else None
      )
      self.devkit = os.path.join(
          self.input_dir, "ILSVRC2012_devkit_t12.tar.gz"
      )
      self.overwrite = overwrite
  
      self.manifests, self.tars = dict(), dict()
      for setn in ("train", "val"):
          self.manifests[setn] = os.path.join(
              self.out_dir, "{}-index.csv".format(setn)
          )
          self.tars[setn] = os.path.join(
              self.input_dir, "ILSVRC2012_img_{}.tar".format(setn)
          )
  
      self.target_size = target_size
      self._target_filenames = {}
  
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 1 to create a new IngestI1K object from inherited base classes: object with example: obj = IngestI1K(input_dir, out_dir, target_size, overwrite)