code: def transform_framerate(self, in_fps, out_fps):
          
          if in_fps <= 0 or out_fps <= 0:
              raise ValueError("Framerates must be positive, cannot transform %f -> %f" % (in_fps, out_fps))
  
          ratio = in_fps / out_fps
          for line in self:
              line.start = int(round(line.start * ratio))
              line.end = int(round(line.end * ratio))
docs: Rescale all timestamps by ratio of in_fps/out_fps.
  
          Can be used to fix files converted from frame-based to time-based
          with wrongly assumed framerate.
  
          Arguments:
              in_fps (float)
              out_fps (float)
  
          Raises:
              ValueError: Non-positive framerate given.