code: def _test_rrc(
      device,
      max_frames,
      layout,
      aspect_ratio_range,
      area_range,
      output_size,
      input_type,
      output_type,
  ):
      batch_size = 4
      pipe = dali.pipeline.Pipeline(batch_size, 4, 0)
      channel_dim = layout.find("C")
      value_range = type_range(test_utils.dali_type_to_np(input_type))
      if channel_dim == len(layout) - 1:
          channel_dim = -1
      input = fn.external_source(
          source=generator(
              batch_size, max_frames, channel_dim, input_type
          ),
          layout=layout,
      )
      shape = fn.shapes(input)
      if device == "gpu":
          input = input.gpu()
      out = fn.random_resized_crop(
          input,
          random_aspect_ratio=aspect_ratio_range,
          random_area=area_range,
          size=output_size,
          interp_type=dali.types.INTERP_LINEAR,
          antialias=False,
          seed=12321,
          dtype=output_type,
      )
      pipe.set_outputs(out, shape)
      pipe.build()
      for iter in range(3):
          outputs, input_shapes = pipe.run()
          if device == "gpu":
              outputs = outputs.as_cpu()
          assert outputs.layout() == layout
          for i in range(batch_size):
              out = outputs.at(i)
              input_shape = input_shapes.at(i).tolist()
              check_output(
                  out,
                  channel_dim,
                  input_shape,
                  aspect_ratio_range,
                  area_range,
                  value_range,
              )
  
file_path: DALI/dali/test/python/operator_2/test_random_resized_crop.py
imports: import numpy
  import nvidia.dali
  import nvidia.dali.fn
  import test_utils
label_desc: Use image node_id 9 for calling a global function with example usage: _test_rrc(device, max_frames, layout, aspect_ratio_range, area_range, output_size, input_type, output_type) without return types