docstr: Test the case when video is already in memory, and decoder reads data in memory
docstr_tok: ["Test","the","case","when","video","is","already","in","memory",",","and","decoder","reads","data","in","memory"]
code: def test_read_video_from_memory_scripted(self, test_video):
      """
      Test the case when video is already in memory, and decoder reads data in memory
      """
      # 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
  
      scripted_fun = torch.jit.script(io._read_video_from_memory)
      assert scripted_fun is not None
  
      _, video_tensor = _get_video_tensor(VIDEO_DIR, test_video)
  
      # decode all frames using cpp decoder
      scripted_fun(
          video_tensor,
          SEEK_FRAME_MARGIN,
          1,  # readVideoStream
          width,
          height,
          min_dimension,
          max_dimension,
          [video_start_pts, video_end_pts],
          video_timebase_num,
          video_timebase_den,
          1,  # readAudioStream
          samples,
          channels,
          [audio_start_pts, audio_end_pts],
          audio_timebase_num,
          audio_timebase_den,
      )
  
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 22 for calling the TestVideoReader obj's underlying member method code with example usage: obj.test_read_video_from_memory_scripted(test_video) without return types