code: def read_imgs(num_imgs, dtype, seed):
      @pipeline_def
      def pipeline():
          input, _ = fn.readers.file(
              file_root=images_dir, random_shuffle=True, seed=seed
          )
          return fn.decoders.image(
              input, device="cpu", output_type=types.RGB
          )
  
      pipe = pipeline(batch_size=num_imgs, device_id=0, num_threads=4)
      pipe.build()
      (batch,) = pipe.run()
      return [np.array(img, dtype=dtype) for img in batch]
  
imports: import itertools
  import os
  import unittest
  import numpy
  from nvidia.dali import pipeline_def, fn, types
  from test_utils import get_dali_extra_path
  from nose_utils import assert_raises
  from nose2.tools import params
  from debayer_test_utils import bayer_patterns, blue_position, blue_position2pattern, rgb2bayer, rgb2bayer_seq, debayer_bilinear_npp_pattern, debayer_bilinear_npp_pattern_seq
label_desc: Use image node_id 1 for calling a global function with example usage: read_imgs(num_imgs, dtype, seed) and returns: unknown, fn