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 __getitem__(self, index):
      sample = self.collection[index]
      if sample.offset is None:
          sample.offset = 0
  
      uniq_id = os.path.splitext(os.path.basename(sample.audio_file))[0]
      scale_n = len(self.emb_dict.keys())
      _avg_embs = torch.stack(
          [
              self.emb_dict[scale_index][uniq_id]["avg_embs"]
              for scale_index in range(scale_n)
          ]
      )
  
      if self.pairwise_infer:
          avg_embs = _avg_embs[:, :, self.collection[index].target_spks]
      else:
          avg_embs = _avg_embs
  
      if avg_embs.shape[2] > self.max_spks:
          raise ValueError(
              f" avg_embs.shape[2] {avg_embs.shape[2]} should be less than or equal to self.max_num_speakers {self.max_spks}"
          )
  
      feats = []
      for scale_index in range(scale_n):
          repeat_mat = self.emb_seq["session_scale_mapping"][uniq_id][
              scale_index
          ]
          feats.append(
              self.emb_seq[scale_index][uniq_id][repeat_mat, :]
          )
      feats_out = torch.stack(feats).permute(1, 0, 2)
      feats_len = feats_out.shape[0]
  
      if self.seq_eval_mode:
          targets = self.parse_rttm_multiscale(sample)
      else:
          targets = torch.zeros(feats_len, 2).float()
  
      return feats_out, feats_len, targets, avg_embs
  
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 6 for calling the _AudioMSDDInferDataset obj's underlying member method code with example usage: obj.__getitem__(index) and returns: feats_out,  feats_len,  targets,  avg_embs