class_docstr: Dataset class that loads a json file containing paths to audio files,
  RTTM files and number of speakers. This Dataset class is built for diarization inference and
  evaluation. Speaker embedding sequences, segment timestamps, cluster-average speaker embeddings
  are loaded from memory and fed into the dataloader.
  
  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.
      emb_dict (dict):
          Dictionary containing cluster-average embeddings and speaker mapping information.
      emb_seq (dict):
          Dictionary containing multiscale speaker embedding sequence, scale mapping and corresponding segment timestamps.
      clus_label_dict (dict):
          Subsegment-level (from base-scale) speaker labels from clustering results.
      soft_label_thres (float):
          A threshold that determines the label of each segment based on RTTM file information.
      featurizer:
          Featurizer instance for generating features from raw waveform.
      seq_eval_mode (bool):
          If True, F1 score will be calculated for each speaker pair during inference mode.
      window_stride (float):
          Window stride for acoustic feature. This value is used for calculating the numbers of feature-level frames.
      use_single_scale_clus (bool):
          Use only one scale for clustering instead of using multiple scales of embeddings for clustering.
      pairwise_infer (bool):
          This variable should be True if dataloader is created for an inference task.
code: def __init__(
      self,
      *,
      manifest_filepath: str,
      emb_dict: Dict,
      emb_seq: Dict,
      clus_label_dict: Dict,
      soft_label_thres: float,
      seq_eval_mode: bool,
      window_stride: float,
      use_single_scale_clus: bool,
      pairwise_infer: bool,
  ):
      super().__init__()
      self.collection = DiarizationSpeechLabel(
          manifests_files=manifest_filepath.split(","),
          emb_dict=emb_dict,
          clus_label_dict=clus_label_dict,
          seq_eval_mode=seq_eval_mode,
          pairwise_infer=pairwise_infer,
      )
      self.emb_dict = emb_dict
      self.emb_seq = emb_seq
      self.clus_label_dict = clus_label_dict
      self.round_digits = 2
      self.decim = 10**self.round_digits
      self.frame_per_sec = int(1 / window_stride)
      self.soft_label_thres = soft_label_thres
      self.pairwise_infer = pairwise_infer
      self.max_spks = 2
      self.use_single_scale_clus = use_single_scale_clus
      self.seq_eval_mode = seq_eval_mode
  
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 2 to create a new _AudioMSDDInferDataset object from inherited base classes: Dataset with example: obj = _AudioMSDDInferDataset()