code: def _process_data(data):
      global BLACKLIST_IDS
      text = []
      wav_scp = []
      utt2spk = []
      for dialogue in data:
          dialogue_id = dialogue["dlg_id"]
          for utterance in dialogue["utterances"]:
              wav_path = os.path.join(
                  domain_dir,
                  "audios/{}.wav".format(utterance["wav_id"]),
              )
              utt_id = "{}-{}-{}".format(
                  domain_dir.parts[-1],
                  utterance["wav_id"],
                  utterance["utt_id"],
              )
              slots = ["none", "none", "none"]
              try:
                  slots[0] = (
                      utterance["semantic"][0][0]
                      if utterance["semantic"]
                      and len(utterance["semantic"][0]) > 0
                      else "none"
                  )
                  slots[1] = (
                      utterance["semantic"][0][1]
                      if utterance["semantic"]
                      and len(utterance["semantic"][0]) > 1
                      else "none"
                  )
              except Exception as e:
                  print(e)
  
              intent = "_".join(slots)
              transcription = (
                  intent
                  + " "
                  + word_segmentation(utterance["manual_transcript"])
              )
              if utt_id in BLACKLIST_IDS:
                  continue
              text.append("{} {}".format(utt_id, transcription))
              wav_scp.append("{} {}".format(utt_id, wav_path))
              utt2spk.append("{} {}".format(utt_id, dialogue_id))
  
      return text, wav_scp, utt2spk
  
imports: import json
  import os
  import string
  import sys
  from pathlib import Path
label_desc: Use image node_id 2 for calling a global function with example usage: _process_data(data) and returns: text,  wav_scp,  utt2spk