code: def get_num_frames(encoded_video):
      input_name = "VIDEO_INPUT"
      decoder_pipe = video_decoder_pipeline(
          input_name=input_name,
          batch_size=1,
          device="cpu",
          **common_pipeline_params,
      )
      decoder_pipe.build()
      decoder_pipe.feed_input(input_name, [encoded_video])
      decoder_out = decoder_pipe.run()
      return decoder_out[0].as_array()[0].shape[0]
  
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 4 for calling a global function with example usage: get_num_frames(encoded_video) and returns: decoder_out