code: def get_mix_size_image_pipeline(
      batch_size,
      num_threads,
      device,
      device_id=0,
      shard_id=0,
      num_shards=1,
      def_for_dataset=False,
  ):
      test_data_root = get_dali_extra_path()
      file_root = os.path.join(
          test_data_root, "db", "coco_dummy", "images"
      )
      annotations_file = os.path.join(
          test_data_root, "db", "coco_dummy", "instances.json"
      )
  
      pipe = Pipeline(batch_size, num_threads, device_id)
      with pipe:
          jpegs, _, _, image_ids = fn.readers.coco(
              file_root=file_root,
              annotations_file=annotations_file,
              shard_id=shard_id,
              num_shards=num_shards,
              ratio=False,
              image_ids=True,
          )
          images = fn.decoders.image(
              jpegs,
              device=("mixed" if device == "gpu" else "cpu"),
              output_type=types.RGB,
          )
  
          pipe.set_outputs(images)
  
      shapes = ((batch_size, None, None, None),)
      dtypes = (tf.float32,)
  
      return pipe, shapes, dtypes
  
imports: import math
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.plugin.tf
  import nvidia.dali.types
  import os
  import tensorflow
  from contextlib import contextmanager
  from nose import SkipTest
  from nvidia.dali.pipeline import Pipeline
  from tensorflow.python.client import device_lib
  from test_utils import to_array, get_dali_extra_path
label_desc: Use image node_id 6 for calling a global function with example usage: get_mix_size_image_pipeline(batch_size, num_threads, device, device_id, shard_id, num_shards, def_for_dataset) and returns: pipe,  shapes,  dtypes