code: def get_subsegment_dict(
      subsegments_manifest_file: str,
      window: float,
      shift: float,
      deci: int,
  ) -> Dict[str, dict]:
      """
      Get subsegment dictionary from manifest file.
  
      Args:
          subsegments_manifest_file (str): Path to subsegment manifest file
          window (float): Window length for segmentation
          shift (float): Shift length for segmentation
          deci (int): Rounding number of decimal places
      Returns:
          _subsegment_dict (dict): Subsegment dictionary
      """
      _subsegment_dict = {}
      with open(subsegments_manifest_file, "r") as subsegments_manifest:
          segments = subsegments_manifest.readlines()
          for segment in segments:
              segment = segment.strip()
              dic = json.loads(segment)
              audio, offset, duration, label = (
                  dic["audio_filepath"],
                  dic["offset"],
                  dic["duration"],
                  dic["label"],
              )
              subsegments = get_subsegments(
                  offset=offset,
                  window=window,
                  shift=shift,
                  duration=duration,
              )
              if dic["uniq_id"] is not None:
                  uniq_id = dic["uniq_id"]
              else:
                  uniq_id = get_uniq_id_with_period(audio)
              if uniq_id not in _subsegment_dict:
                  _subsegment_dict[uniq_id] = {"ts": [], "json_dic": []}
              for subsegment in subsegments:
                  start, dur = subsegment
              _subsegment_dict[uniq_id]["ts"].append(
                  [round(start, deci), round(start + dur, deci)]
              )
              _subsegment_dict[uniq_id]["json_dic"].append(dic)
      return _subsegment_dict
  
imports: import json
  import os
  from collections import Counter
  from collections import OrderedDict
  from pathlib import Path
  from typing import Dict, List, Union
  import librosa
  import numpy
  from nemo.collections.asr.parts.utils.speaker_utils import audio_rttm_map, get_subsegments, get_uniqname_from_filepath, rttm_to_labels, segments_manifest_to_subsegments_manifest, write_rttm2manifest
  from nemo.utils.data_utils import DataStoreObject
label_desc: Use image node_id 5 for calling a global function with example usage: get_subsegment_dict(subsegments_manifest_file, window, shift, deci) and returns: _subsegment_dict