docstr: Test the case when decoder starts with a video file to decode frames, and
  only reads video stream and ignores audio stream
docstr_tok: ["Test","the","case","when","decoder","starts","with","a","video","file","to","decode","frames",",","and","only","reads","video","stream","and","ignores","audio","stream"]
code: def test_read_video_from_file_read_single_stream_only(
      self, test_video, config, read_video_stream, read_audio_stream
  ):
      """
      Test the case when decoder starts with a video file to decode frames, and
      only reads video stream and ignores audio stream
      """
      # video related
      width, height, min_dimension, max_dimension = 0, 0, 0, 0
      video_start_pts, video_end_pts = 0, -1
      video_timebase_num, video_timebase_den = 0, 1
      # audio related
      samples, channels = 0, 0
      audio_start_pts, audio_end_pts = 0, -1
      audio_timebase_num, audio_timebase_den = 0, 1
  
      full_path = os.path.join(VIDEO_DIR, test_video)
      # decode all frames using new decoder
      tv_result = torch.ops.video_reader.read_video_from_file(
          full_path,
          SEEK_FRAME_MARGIN,
          0,  # getPtsOnly
          read_video_stream,
          width,
          height,
          min_dimension,
          max_dimension,
          video_start_pts,
          video_end_pts,
          video_timebase_num,
          video_timebase_den,
          read_audio_stream,
          samples,
          channels,
          audio_start_pts,
          audio_end_pts,
          audio_timebase_num,
          audio_timebase_den,
      )
  
      (
          vframes,
          vframe_pts,
          vtimebase,
          vfps,
          vduration,
          aframes,
          aframe_pts,
          atimebase,
          asample_rate,
          aduration,
      ) = tv_result
  
      assert (vframes.numel() > 0) is bool(read_video_stream)
      assert (vframe_pts.numel() > 0) is bool(read_video_stream)
      assert (vtimebase.numel() > 0) is bool(read_video_stream)
      assert (vfps.numel() > 0) is bool(read_video_stream)
  
      expect_audio_data = (
          read_audio_stream == 1
          and config.audio_sample_rate is not None
      )
      assert (aframes.numel() > 0) is bool(expect_audio_data)
      assert (aframe_pts.numel() > 0) is bool(expect_audio_data)
      assert (atimebase.numel() > 0) is bool(expect_audio_data)
      assert (asample_rate.numel() > 0) is bool(expect_audio_data)
  
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 7 for calling the TestVideoReader obj's underlying member method code with example usage: obj.test_read_video_from_file_read_single_stream_only(test_video, config, read_video_stream, read_audio_stream) without return types