code: def prepare_test_imgs(num_samples, dtype):
      assert dtype in (np.uint8, np.uint16)
      rng = np.random.default_rng(seed=101)
      imgs = read_imgs(
          num_samples, dtype, seed=42 if dtype == np.uint8 else 13
      )
      if dtype == np.uint16:
          imgs = [
              np.uint16(img) * 256
              + np.uint16(rng.uniform(0, 256, size=img.shape))
              for img in imgs
          ]
      bayered_imgs = {
          pattern: [rgb2bayer(img, pattern) for img in imgs]
          for pattern in bayer_patterns
      }
      npp_baseline = {
          pattern: [
              debayer_bilinear_npp_pattern(img, pattern) for img in imgs
          ]
          for pattern, imgs in bayered_imgs.items()
      }
      return bayered_imgs, npp_baseline
  
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 3 for calling a global function with example usage: prepare_test_imgs(num_samples, dtype) and returns: bayered_imgs,  npp_baseline