code: def get_num_of_spk_from_labels(labels: List[str]) -> int:
      """
      Count the number of speakers in a segment label list.
      Args:
          labels (list):
              List containing segment start and end timestamp and speaker labels.
  
              Example:
              >>> labels = ["15.25 21.82 speaker_0", "21.18 29.51 speaker_1", ... ]
  
      Returns:
          n_spk (int):
              The number of speakers in the list `labels`
  
      """
      spk_set = [x.split(" ")[-1].strip() for x in labels]
      return len(set(spk_set))
  
imports: import copy
  import csv
  import json
  import os
  from collections import OrderedDict
  from datetime import datetime
  from typing import Dict, List, Tuple
  import numpy
  from nemo.collections.asr.metrics.der import concat_perm_word_error_rate
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.models import ClusteringDiarizer
  from nemo.collections.asr.parts.utils.speaker_utils import audio_rttm_map, get_uniqname_from_filepath, labels_to_rttmfile, rttm_to_labels, write_rttm2manifest
  from nemo.utils import logging
label_desc: Use image node_id 8 for calling a global function with example usage: get_num_of_spk_from_labels(labels) and returns: len