code: def test_decode_cpu(src, threads, decoder=None, frames_per_chunk=5):
      s = StreamReader(src)
      s.add_video_stream(
          frames_per_chunk,
          decoder=decoder,
          decoder_option={"threads": f"{threads}"},
      )
  
      num_frames = 0
      device = torch.device("cuda")
      t0 = time.monotonic()
      for i, (chunk,) in enumerate(s.stream()):
          if i == 0:
              print(f" - Shape: {chunk.shape}")
          num_frames += chunk.shape[0]
          chunk = chunk.to(device)
      elapsed = time.monotonic() - t0
      fps = num_frames / elapsed
      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 10 for calling a global function with example usage: test_decode_cpu(src, threads, decoder, frames_per_chunk) and returns: fps