code: def ground_truth_pipeline(
      batch_size, video_reader_params, resize_params
  ):
      pipeline = video_reader_pipeline(batch_size, video_reader_params)
  
      def get_next_frame():
          (pipe_out,) = pipeline.run()
          sequences_out = pipe_out.as_cpu().as_array()
          for sample in range(batch_size):
              for frame in range(
                  video_reader_params["sequence_length"]
              ):
                  yield [
                      np.expand_dims(sequences_out[sample][frame], 0)
                  ]
  
      gt_pipeline = dali.Pipeline(batch_size=1, **pipeline_params)
  
      with gt_pipeline:
          resized_frame = dali.fn.external_source(
              source=get_next_frame, num_outputs=1
          )
          resized_frame = resized_frame[0].gpu()
          resized_frame = dali.fn.resize(resized_frame, **resize_params)
          gt_pipeline.set_outputs(resized_frame)
      gt_pipeline.build()
  
      return gt_pipeline
  
file_path: DALI/dali/test/python/test_video_reader_resize.py
imports: import gc
  import numpy
  import nvidia.dali
  import nvidia.dali.types
label_desc: Use image node_id 4 for calling a global function with example usage: ground_truth_pipeline(batch_size, video_reader_params, resize_params) and returns: gt_pipeline