code: def pts_convert(
      pts: int,
      timebase_from: Fraction,
      timebase_to: Fraction,
      round_func: Callable = math.floor,
  ) -> int:
      """convert pts between different time bases
      Args:
          pts: presentation timestamp, float
          timebase_from: original timebase. Fraction
          timebase_to: new timebase. Fraction
          round_func: rounding function.
      """
      new_pts = Fraction(pts, 1) * timebase_from / timebase_to
      return round_func(new_pts)
  
imports: import bisect
  import math
  import warnings
  from fractions import Fraction
  from typing import Any, Callable, cast, Dict, List, Optional, Tuple, TypeVar, Union
  import torch
  from torchvision.io import _probe_video_from_file, _read_video_from_file, read_video, read_video_timestamps
  from .utils import tqdm
label_desc: Use image node_id 1 for calling a global function with example usage: pts_convert(pts, timebase_from, timebase_to, round_func) and returns: round_func