code: def test_hw_decode_and_resize(
      src, decoder, decoder_option, hw_accel="cuda", frames_per_chunk=5
  ):
      s = StreamReader(src)
      s.add_video_stream(
          5,
          decoder=decoder,
          decoder_option=decoder_option,
          hw_accel=hw_accel,
      )
  
      num_frames = 0
      chunk = None
      t0 = time.monotonic()
      for (chunk,) in s.stream():
          num_frames += chunk.shape[0]
      elapsed = time.monotonic() - t0
      fps = num_frames / elapsed
      print(f" - Shape: {chunk.shape}")
      print(
          f" - Processed {num_frames} frames in {elapsed:.2f} seconds. ({fps:.2f} fps)"
      )
      return fps
  
imports: import torch
  import torchaudio
  import os
  import time
  import matplotlib.pyplot
  from torchaudio.io import StreamReader
  from torchaudio.utils import ffmpeg_utils
label_desc: Use image node_id 15 for calling a global function with example usage: test_hw_decode_and_resize(src, decoder, decoder_option, hw_accel, frames_per_chunk) and returns: fps