code: def get_subsegments(
      offset: float, window: float, shift: float, duration: float
  ) -> List[List[float]]:
      """
      Return subsegments from a segment of audio file
      Args:
          offset (float): start time of audio segment
          window (float): window length for segments to subsegments length
          shift (float): hop length for subsegments shift
          duration (float): duration of segment
      Returns:
          subsegments (List[tuple[float, float]]): subsegments generated for the segments as list of tuple of start and duration of each subsegment
      """
      subsegments: List[List[float]] = []
      start = offset
      slice_end = start + duration
      base = math.ceil((duration - window) / shift)
      slices = 1 if base < 0 else base + 1
      for slice_id in range(slices):
          end = start + window
          if end > slice_end:
              end = slice_end
          subsegments.append([start, end - start])
          start = offset + (slice_id + 1) * shift
      return subsegments
  
imports: import gc
  import json
  import math
  import os
  import shutil
  from copy import deepcopy
  from typing import Dict, List, Tuple, Union
  import numpy
  import omegaconf
  import soundfile
  import torch
  from pyannote.core import Annotation, Segment
  from tqdm import tqdm
  from nemo.collections.asr.data.audio_to_label import repeat_signal
  from nemo.collections.asr.parts.utils.longform_clustering import LongFormSpeakerClustering
  from nemo.collections.asr.parts.utils.offline_clustering import SpeakerClustering, get_argmin_mat, split_input_data
  from nemo.utils import logging
label_desc: Use image node_id 32 for calling a global function with example usage: get_subsegments(offset, window, shift, duration) and returns: subsegments