code: def create_decoder_random_crop_pipeline(data_path, device):
      seed = 1234
      jpegs, _ = fn.readers.file(
          file_root=data_path, shard_id=0, num_shards=1, name="Reader"
      )
  
      w = 242
      h = 230
      images_random_crop_1 = fn.decoders.image_random_crop(
          jpegs,
          device=device,
          output_type=types.RGB,
          hw_decoder_load=0.7,
          seed=seed,
      )
      images_random_crop_1 = fn.resize(
          images_random_crop_1, size=(w, h)
      )
  
      images = fn.decoders.image(
          jpegs,
          device=device,
          hw_decoder_load=0.7,
          output_type=types.RGB,
      )
      images_random_crop_2 = fn.random_resized_crop(
          images, size=(w, h), seed=seed
      )
  
      return images_random_crop_1, images_random_crop_2
  
imports: import glob
  import math
  import numpy
  import nvidia.dali.backend
  import nvidia.dali.fn
  import nvidia.dali.types
  import os
  import random
  from nvidia.dali import pipeline_def
  from nose2.tools import params
  from nose_utils import assert_raises
  from test_utils import check_output_pattern
  from test_utils import compare_pipelines
  from test_utils import get_dali_extra_path
  from test_utils import to_array
label_desc: Use image node_id 7 for calling a global function with example usage: create_decoder_random_crop_pipeline(data_path, device) and returns: images_random_crop_1,  images_random_crop_2