class_docstr: Meta data for a kaldi corpus directory. 
class_docstr_tok: ["Meta","data","for","a","kaldi","corpus","directory","."]
docstr: Convert utt2spk to spk2utt. 
docstr_tok: ["Convert","utt2spk","to","spk2utt","."]
code: def collect_spks_from_utts(self):
      """Convert utt2spk to spk2utt."""
      for utt_key, utt in self.utts.items():
          if self.spks[utt.spk].utts is None:
              self.spks[utt.spk].utts = []
          self.spks[utt.spk].utts.append(utt_key)
      for spk_idx, spk in enumerate(sorted(self.spks.keys())):
          self.spks[spk].id = spk_idx
          self.spks[spk].numutt = len(self.spks[spk].utts)
  
file_path: delta/delta/utils/kaldi/kaldi_dir.py
imports: import os
  from collections import defaultdict
  from absl import logging
label_desc: Use image node_id 4 for calling the KaldiMetaData obj's underlying member method code with example usage: obj.collect_spks_from_utts() without return types