code: def get_spk2utt_librimix(paths, audio_format="flac"):
      spk2utt = defaultdict(list)
      for path in paths:
          for audio in chain(
              Path(path).rglob("s1/*.{}".format(audio_format)),
              Path(path).rglob("s2/*.{}".format(audio_format)),
              Path(path).rglob("s3/*.{}".format(audio_format)),
          ):
              spk_idx = int(audio.parent.stem[1:]) - 1
              mix_uid = audio.stem
              uid = mix_uid.split("_")[spk_idx]
              sid = uid.split("-")[0]
              spk2utt[sid].append((uid, str(audio)))
  
      return spk2utt
  
imports: import json
  from collections import defaultdict
  from itertools import chain
  from pathlib import Path
  from espnet2.utils.types import str2bool
label_desc: Use image node_id 2 for calling a global function with example usage: get_spk2utt_librimix(paths, audio_format) and returns: spk2utt