class_docstr: Dataset class that loads a json file containing paths to audio files,
  RTTM files and number of speakers. This Dataset class is designed for
  training or fine-tuning speaker embedding extractor and diarization decoder
  at the same time.
  
  Example:
  {"audio_filepath": "/path/to/audio_0.wav", "num_speakers": 2,
  "rttm_filepath": "/path/to/diar_label_0.rttm}
  ...
  {"audio_filepath": "/path/to/audio_n.wav", "num_speakers": 2,
  "rttm_filepath": "/path/to/diar_label_n.rttm}
  
  Args:
      manifest_filepath (str):
          Path to input manifest json files.
      multiscale_args_dict (dict):
          Dictionary containing the parameters for multiscale segmentation and clustering.
      emb_dir (str):
          Path to a temporary folder where segmentation information for embedding extraction is saved.
      soft_label_thres (float):
          Threshold that determines the label of each segment based on RTTM file information.
      featurizer:
          Featurizer instance for generating features from the raw waveform.
      window_stride (float):
          Window stride for acoustic feature. This value is used for calculating the numbers of feature-level frames.
      emb_batch_size (int):
          Number of embedding vectors that are trained with attached computational graphs.
      pairwise_infer (bool):
          This variable should be True if dataloader is created for an inference task.
      random_flip (bool):
          If True, the two labels and input signals are randomly flipped per every epoch while training.
docstr: Generate unique training sample ID from unique file ID, offset and duration. The start-end time added
  unique ID is required for identifying the sample since multiple short audio samples are generated from a single
  audio file. The start time and end time of the audio stream uses millisecond units if `deci=3`.
  
  Args:
      sample:
          `DiarizationSpeechLabel` instance from collections.
  
  Returns:
      uniq_id (str):
          Unique sample ID which includes start and end time of the audio stream.
          Example: abc1001_3122_6458
docstr_tok: ["Generate","unique","training","sample","ID","from","unique","file","ID",",","offset","and","duration",".","The","start-end","time","added","unique","ID","is","required","for","identifying","the","sample","since","multiple","short","audio","samples","are","generated","from","a","single","audio","file",".","The","start","time","and","end","time","of","the","audio","stream","uses","millisecond","units","if","`","deci=3","`",".","Args",":","sample",":","`","DiarizationSpeechLabel","`","instance","from","collections",".","Returns",":","uniq_id","(","str",")",":","Unique","sample","ID","which","includes","start","and","end","time","of","the","audio","stream",".","Example",":","abc1001_3122_6458"]
code: def get_uniq_id_with_range(self, sample, deci=3):
      """
      Generate unique training sample ID from unique file ID, offset and duration. The start-end time added
      unique ID is required for identifying the sample since multiple short audio samples are generated from a single
      audio file. The start time and end time of the audio stream uses millisecond units if `deci=3`.
  
      Args:
          sample:
              `DiarizationSpeechLabel` instance from collections.
  
      Returns:
          uniq_id (str):
              Unique sample ID which includes start and end time of the audio stream.
              Example: abc1001_3122_6458
  
      """
      bare_uniq_id = os.path.splitext(
          os.path.basename(sample.rttm_file)
      )[0]
      offset = str(int(round(sample.offset, deci) * pow(10, deci)))
      endtime = str(
          int(
              round(sample.offset + sample.duration, deci)
              * pow(10, deci)
          )
      )
      uniq_id = f"{bare_uniq_id}_{offset}_{endtime}"
      return uniq_id
  
imports: import os
  from collections import OrderedDict
  from statistics import mode
  from typing import Dict, Optional
  import torch
  from nemo.collections.asr.parts.utils.offline_clustering import get_argmin_mat
  from nemo.collections.asr.parts.utils.speaker_utils import convert_rttm_line, prepare_split_data
  from nemo.collections.common.parts.preprocessing.collections import DiarizationSpeechLabel
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import AudioSignal, EncodedRepresentation, LengthsType, NeuralType, ProbsType
label_desc: Use image node_id 7 for calling the _AudioMSDDTrainDataset obj's underlying member method code with example usage: obj.get_uniq_id_with_range(sample, deci) and returns: uniq_id