code: def main(
      input_manifest_path,
      output_manifest_path,
      pairwise_rttm_output_folder,
      window,
      shift,
      step_count,
      decimals,
  ):
      if ".json" not in input_manifest_path:
          raise ValueError(
              "input_manifest_path file should be .json file format"
          )
      if output_manifest_path and ".json" not in output_manifest_path:
          raise ValueError(
              "output_manifest_path file should be .json file format"
          )
      elif not output_manifest_path:
          output_manifest_path = rreplace(
              input_manifest_path, ".json", f".{step_count}seg.json"
          )
  
      if pairwise_rttm_output_folder is not None:
          if not pairwise_rttm_output_folder.endswith("/"):
              pairwise_rttm_output_folder = (
                  f"{pairwise_rttm_output_folder}/"
              )
          org_audio_rttm_map = audio_rttm_map(input_manifest_path)
          (
              input_manifest_dict,
              AUDIO_RTTM_MAP,
          ) = split_into_pairwise_rttm(
              audio_rttm_map=org_audio_rttm_map,
              input_manifest_path=input_manifest_path,
              output_dir=pairwise_rttm_output_folder,
          )
      else:
          input_manifest_dict = get_input_manifest_dict(
              input_manifest_path
          )
          AUDIO_RTTM_MAP = audio_rttm_map(input_manifest_path)
  
      segment_manifest_path = rreplace(
          input_manifest_path, ".json", "_seg.json"
      )
      subsegment_manifest_path = rreplace(
          input_manifest_path, ".json", "_subseg.json"
      )
  
      # todo: do we need to expose this?
      min_subsegment_duration = 0.05
      step_count = int(step_count)
  
      segments_manifest_file = write_rttm2manifest(
          AUDIO_RTTM_MAP, segment_manifest_path, decimals
      )
      subsegments_manifest_file = subsegment_manifest_path
  
      logging.info("Creating subsegments.")
      segments_manifest_to_subsegments_manifest(
          segments_manifest_file=segments_manifest_file,
          subsegments_manifest_file=subsegments_manifest_file,
          window=window,
          shift=shift,
          min_subsegment_duration=min_subsegment_duration,
          include_uniq_id=True,
      )
      subsegments_dict = get_subsegment_dict(
          subsegments_manifest_file, window, shift, decimals
      )
      write_truncated_subsegments(
          input_manifest_dict,
          subsegments_dict,
          output_manifest_path,
          step_count,
          decimals,
      )
      os.remove(segment_manifest_path)
      os.remove(subsegment_manifest_path)
  
file_path: NeMo/scripts/speaker_tasks/create_msdd_train_dataset.py
imports: import argparse
  import copy
  import itertools
  import os
  import random
  from tqdm import tqdm
  from nemo.collections.asr.parts.utils.manifest_utils import get_input_manifest_dict, get_subsegment_dict, rreplace, write_truncated_subsegments
  from nemo.collections.asr.parts.utils.speaker_utils import audio_rttm_map, rttm_to_labels, segments_manifest_to_subsegments_manifest, write_rttm2manifest
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: main(input_manifest_path, output_manifest_path, pairwise_rttm_output_folder, window, shift, step_count, decimals) without return types