code: def load_session(pathSession):
      """Load wav file from IEMOCAP session
      and keep only the following 4 emotions:
      [neural, happy, sad, anger].
  
      Arguments
      ---------
          pathSession: str
              Path folder of IEMOCAP session.
      Returns
      -------
          improvisedUtteranceList: list
              List of improvised utterancefor IEMOCAP session.
      """
      pathEmo = pathSession + "/dialog/EmoEvaluation/"
      pathWavFolder = pathSession + "/sentences/wav/"
  
      improvisedUtteranceList = []
      for emoFile in [
          f
          for f in os.listdir(pathEmo)
          if os.path.isfile(os.path.join(pathEmo, f))
      ]:
          for utterance in load_utterInfo(pathEmo + emoFile):
              if (
                  (utterance[3] == "neu")
                  or (utterance[3] == "hap")
                  or (utterance[3] == "sad")
                  or (utterance[3] == "ang")
                  or (utterance[3] == "exc")
              ):
                  path = (
                      pathWavFolder
                      + utterance[2][:-5]
                      + "/"
                      + utterance[2]
                      + ".wav"
                  )
  
                  label = utterance[3]
                  if label == "exc":
                      label = "hap"
  
                  if emoFile[7] != "i" and utterance[2][7] == "s":
                      improvisedUtteranceList.append(
                          [path, label, utterance[2][18]]
                      )
                  else:
                      improvisedUtteranceList.append(
                          [path, label, utterance[2][15]]
                      )
      return improvisedUtteranceList
  
file_path: speechbrain/recipes/IEMOCAP/emotion_recognition/iemocap_prepare.py
imports: import os
  import re
  import json
  import random
  import logging
  from speechbrain.dataio.dataio import read_audio
label_desc: Use image node_id 8 for calling a global function with example usage: load_session(pathSession) and returns: improvisedUtteranceList