code: def file_reader_pipeline(
      data_path,
      batch_size,
      num_threads,
      device_id,
      prefetch_queue_depth,
      reader_queue_depth,
      read_encoded,
      **kwargs,
  ):
      pipe = dali.pipeline.Pipeline(
          batch_size=batch_size,
          num_threads=num_threads,
          device_id=device_id,
          prefetch_queue_depth=prefetch_queue_depth,
      )
      with pipe:
          images, labels = dali.fn.readers.file(
              name="Reader",
              file_root=data_path,
              prefetch_queue_depth=reader_queue_depth,
              random_shuffle=True,
          )
          dev = "mixed" if read_encoded else "cpu"
          images = dali.fn.decoders.image(
              images, device=dev, output_type=types.RGB
          )
          images = common_pipeline(images.gpu())
          pipe.set_outputs(images, labels)
      return pipe
  
imports: import argparse
  import cv2
  import numpy
  import nvidia.dali
  import nvidia.dali.types
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: file_reader_pipeline(data_path, batch_size, num_threads, device_id, prefetch_queue_depth, reader_queue_depth, read_encoded) and returns: pipe