code: def get_scale_mapping_list(uniq_timestamps):
      """
      Call get_argmin_mat function to find the index of the non-base-scale segment that is closest to the
      given base-scale segment. For each scale and each segment, a base-scale segment is assigned.
  
      Args:
          uniq_timestamps: (dict)
              The dictionary containing embeddings, timestamps and multiscale weights.
              If uniq_timestamps contains only one scale, single scale diarization is performed.
  
      Returns:
          scale_mapping_argmat (torch.tensor):
  
              The element at the m-th row and the n-th column of the scale mapping matrix indicates the (m+1)-th scale
              segment index which has the closest center distance with (n+1)-th segment in the base scale.
  
              - Example:
                  `scale_mapping_argmat[2][101] = 85`
  
              In the above example, the code snippet means that 86-th segment in the 3rd scale (python index is 2) is
              mapped to the 102-th segment in the base scale. Thus, the longer segments bound to have more repeating
              numbers since multiple base scale segments (since the base scale has the shortest length) fall into the
              range of the longer segments. At the same time, each row contains N numbers of indices where N is number
              of segments in the base-scale (i.e., the finest scale).
      """
      timestamps_in_scales = []
      for key, val in uniq_timestamps["scale_dict"].items():
          timestamps_in_scales.append(torch.tensor(val["time_stamps"]))
      session_scale_mapping_list = get_argmin_mat(timestamps_in_scales)
      scale_mapping_argmat = [
          [] for _ in range(len(uniq_timestamps["scale_dict"].keys()))
      ]
      for scale_idx in range(len(session_scale_mapping_list)):
          scale_mapping_argmat[scale_idx] = session_scale_mapping_list[
              scale_idx
          ]
      scale_mapping_argmat = torch.stack(scale_mapping_argmat)
      return scale_mapping_argmat
  
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 1 for calling a global function with example usage: get_scale_mapping_list(uniq_timestamps) and returns: scale_mapping_argmat