code: def emotion(root_path, meta_file, ignored_speakers=None):
      """Generic emotion dataset"""
      txt_file = os.path.join(root_path, meta_file)
      items = []
      with open(txt_file, "r", encoding="utf-8") as ttf:
          for line in ttf:
              if line.startswith("file_path"):
                  continue
              cols = line.split(",")
              wav_file = os.path.join(root_path, cols[0])
              speaker_id = cols[1]
              emotion_id = cols[2].replace("\n", "")
              # ignore speakers
              if isinstance(ignored_speakers, list):
                  if speaker_id in ignored_speakers:
                      continue
              items.append(
                  {
                      "audio_file": wav_file,
                      "speaker_name": speaker_id,
                      "emotion_name": emotion_id,
                      "root_path": root_path,
                  }
              )
      return items
  
imports: import os
  import re
  import xml.etree.ElementTree
  from glob import glob
  from pathlib import Path
  from typing import List
  import pandas
  from tqdm import tqdm
label_desc: Use image node_id 26 for calling a global function with example usage: emotion(root_path, meta_file, ignored_speakers) and returns: items