code: def test_video_input_compare_with_video_decoder(
      device, frames_per_sequence, batch_size, test_file
  ):
      """
      Compares the VideoInput with the VideoDecoder.
      """
      input_name = "VIDEO_INPUT"
  
      decoder_pipe = video_decoder_pipeline(
          input_name=input_name,
          batch_size=1,
          device=device,
          **common_pipeline_params,
      )
      input_pipe = video_input_pipeline(
          input_name=input_name,
          batch_size=batch_size,
          sequence_length=frames_per_sequence,
          device=device,
          **common_pipeline_params,
      )
  
      decoder_pipe.build()
      decoder_pipe.feed_input(input_name, [test_file])
      decoder_out = decoder_pipe.run()
  
      input_pipe.build()
      input_pipe.feed_input(input_name, np.array([[test_file]]))
  
      for ref_seq in portion_out_reference_sequence(
          decoder_out, frames_per_sequence, batch_size
      ):
          input_out = input_pipe.run()
          test_seq = to_array(input_out[0])
          assert np.all(ref_seq == test_seq)
  
file_path: DALI/dali/test/python/input/test_video.py
imports: import glob
  import itertools
  import numpy
  import nvidia.dali.fn
  import nvidia.dali.types
  from nose2.tools import params
  from nose_utils import assert_raises
  from nvidia.dali import pipeline_def
  from test_utils import get_dali_extra_path, to_array
label_desc: Use image node_id 7 for calling a global function with example usage: test_video_input_compare_with_video_decoder(device, frames_per_sequence, batch_size, test_file) without return types