docstr: check the decoding results from TorchVision decoder
docstr_tok: ["check","the","decoding","results","from","TorchVision","decoder"]
code: def check_separate_decoding_result(self, tv_result, config):
      """check the decoding results from TorchVision decoder"""
      (
          vframes,
          vframe_pts,
          vtimebase,
          vfps,
          vduration,
          aframes,
          aframe_pts,
          atimebase,
          asample_rate,
          aduration,
      ) = tv_result
  
      video_duration = vduration.item() * Fraction(
          vtimebase[0].item(), vtimebase[1].item()
      )
      assert video_duration == approx(config.duration, abs=0.5)
  
      assert vfps.item() == approx(config.video_fps, abs=0.5)
  
      if asample_rate.numel() > 0:
          assert asample_rate.item() == config.audio_sample_rate
          audio_duration = aduration.item() * Fraction(
              atimebase[0].item(), atimebase[1].item()
          )
          assert audio_duration == approx(config.duration, abs=0.5)
  
      # check if pts of video frames are sorted in ascending order
      for i in range(len(vframe_pts) - 1):
          assert vframe_pts[i] < vframe_pts[i + 1]
  
      if len(aframe_pts) > 1:
          # check if pts of audio frames are sorted in ascending order
          for i in range(len(aframe_pts) - 1):
              assert aframe_pts[i] < aframe_pts[i + 1]
  
imports: import collections
  import math
  import os
  from fractions import Fraction
  import numpy
  import pytest
  import torch
  import torchvision.io
  from common_utils import assert_equal
  from numpy.random import randint
  from pytest import approx
  from torchvision import set_video_backend
  from torchvision.io import _HAS_VIDEO_OPT
label_desc: Use image node_id 1 for calling the TestVideoReader obj's underlying member method code with example usage: obj.check_separate_decoding_result(tv_result, config) without return types