code: def compute_time_decimate_segments(
      src_segment: Segment,
      dst_segment: Segment,
      src_duration: float,
      speed_factor: float,
      transition_duration: float,
      new_src_segments: List[Segment],
      new_dst_segments: List[Segment],
      **kwargs,
  ) -> None:
      start_offset = src_duration * kwargs["start_offset_factor"]
      on_segment = src_duration * kwargs["on_factor"]
      off_segment = on_segment * kwargs["off_factor"]
      n = int(
          (src_duration - start_offset) / (on_segment + off_segment)
      )
  
      dst_offset = 0
      for i in range(n):
          crop_start = (
              start_offset
              + i * on_segment
              + i * off_segment
              + (i > 0) * transition_duration / 2.0
          )
          crop_end = (
              start_offset
              + (i + 1) * on_segment
              + i * off_segment
              - (i < n - 1) * transition_duration / 2
          )
          crop_end = min(src_duration, crop_end)
  
          if crop_start > src_duration:
              break
  
          compute_time_crop_segments(
              src_segment,
              dst_segment,
              speed_factor,
              crop_start,
              crop_end,
              new_src_segments,
              new_dst_segments,
              end_dst_offset=dst_offset,
          )
          dst_offset = new_dst_segments[-1].end
  
file_path: AugLy/augly/video/helpers/metadata.py
imports: from copy import deepcopy
  from typing import Any, Dict, List, Optional, Tuple
  from augly import utils
  from augly.video import helpers
  from augly.video.helpers import intensity
label_desc: Use image node_id 4 for calling a global function with example usage: compute_time_decimate_segments(src_segment, dst_segment, src_duration, speed_factor, transition_duration, new_src_segments, new_dst_segments) without return types