code: def _read_video_timestamps_from_memory(
      video_data: torch.Tensor,
  ) -> Tuple[List[int], List[int], VideoMetaData]:
      """
      Decode all frames in the video. Only pts (presentation timestamp) is returned.
      The actual frame pixel data is not copied. Thus, read_video_timestamps(...)
      is much faster than read_video(...)
      """
      if not isinstance(video_data, torch.Tensor):
          with warnings.catch_warnings():
              # Ignore the warning because we actually don't modify the buffer in this function
              warnings.filterwarnings(
                  "ignore", message="The given buffer is not writable"
              )
              video_data = torch.frombuffer(
                  video_data, dtype=torch.uint8
              )
      result = torch.ops.video_reader.read_video_from_memory(
          video_data,
          0,  # seek_frame_margin
          1,  # getPtsOnly
          1,  # read_video_stream
          0,  # video_width
          0,  # video_height
          0,  # video_min_dimension
          0,  # video_max_dimension
          0,  # video_start_pts
          -1,  # video_end_pts
          0,  # video_timebase_num
          1,  # video_timebase_den
          1,  # read_audio_stream
          0,  # audio_samples
          0,  # audio_channels
          0,  # audio_start_pts
          -1,  # audio_end_pts
          0,  # audio_timebase_num
          1,  # audio_timebase_den
      )
      (
          _vframes,
          vframe_pts,
          vtimebase,
          vfps,
          vduration,
          _aframes,
          aframe_pts,
          atimebase,
          asample_rate,
          aduration,
      ) = result
      info = _fill_info(
          vtimebase, vfps, vduration, atimebase, asample_rate, aduration
      )
  
      vframe_pts = vframe_pts.numpy().tolist()
      aframe_pts = aframe_pts.numpy().tolist()
      return vframe_pts, aframe_pts, info
  
imports: import math
  import warnings
  from fractions import Fraction
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from ..extension import _load_library
label_desc: Use image node_id 8 for calling a global function with example usage: _read_video_timestamps_from_memory(video_data) and returns: vframe_pts,  aframe_pts,  info