code: def __init__(
      self,
      data_paths,
      num_shards,
      batch_size,
      num_threads,
      device_id,
      prefetch,
      fp16,
      random_shuffle,
      nhwc,
      dont_use_mmap,
      decoder_type,
      decoder_cache_params,
      reader_queue_depth,
      shard_id,
  ):
      super(CommonPipeline, self).__init__(
          batch_size,
          num_threads,
          device_id,
          random_shuffle,
          prefetch_queue_depth=prefetch,
      )
      if decoder_type == "roi":
          print("Using nvJPEG with ROI decoding")
          self.decode_gpu = ops.decoders.ImageRandomCrop(
              device="mixed", output_type=types.RGB
          )
          self.res = ops.Resize(
              device="gpu", resize_x=224, resize_y=224
          )
      elif decoder_type == "cached":
          assert decoder_cache_params["cache_enabled"]
          cache_size = decoder_cache_params["cache_size"]
          cache_threshold = decoder_cache_params["cache_threshold"]
          cache_type = decoder_cache_params["cache_type"]
          print(
              f"Using nvJPEG with cache (size : {cache_size} "
              f"threshold: {cache_threshold}, type: {cache_type})"
          )
          self.decode_gpu = ops.decoders.Image(
              device="mixed",
              output_type=types.RGB,
              cache_size=cache_size,
              cache_threshold=cache_threshold,
              cache_type=cache_type,
              cache_debug=False,
          )
          self.res = ops.RandomResizedCrop(
              device="gpu", size=(224, 224)
          )
      else:
          print("Using nvJPEG")
          self.decode_gpu = ops.decoders.Image(
              device="mixed", output_type=types.RGB
          )
          self.res = ops.RandomResizedCrop(
              device="gpu", size=(224, 224)
          )
  
      layout = types.NHWC if nhwc else types.NCHW
      out_type = types.FLOAT16 if fp16 else types.FLOAT
  
      self.cmnp = ops.CropMirrorNormalize(
          device="gpu",
          dtype=out_type,
          output_layout=layout,
          crop=(224, 224),
          mean=[0.485 * 255, 0.456 * 255, 0.406 * 255],
          std=[0.229 * 255, 0.224 * 255, 0.225 * 255],
      )
      self.coin = ops.random.CoinFlip(probability=0.5)
  
imports: from nvidia.dali.pipeline import Pipeline
  import nvidia.dali.ops
  import nvidia.dali.types
  import nvidia.dali.tfrecord
  import os
  import glob
  import argparse
  import time
  from test_utils import get_dali_extra_path, AverageMeter
label_desc: Use image node_id 1 to create a new CommonPipeline object from inherited base classes: Pipeline with example: obj = CommonPipeline(data_paths, num_shards, batch_size, num_threads, device_id, prefetch, fp16, random_shuffle, nhwc, dont_use_mmap, decoder_type, decoder_cache_params, reader_queue_depth, shard_id)