code: def get_emotions(path_to_emotions, filename):
      f = open(os.path.join(path_to_emotions, filename), "r").read()
      f = np.array(f.split("\n"))
      idx = f == ""
      idx_n = np.arange(len(f))[idx]
      emotion = []
      for i in range(len(idx_n) - 2):
          g = f[idx_n[i] + 1 : idx_n[i + 1]]
          head = g[0]
          i0 = head.find(" - ")
          start_time = float(
              head[head.find("[") + 1 : head.find(" - ")]
          )
          end_time = float(head[head.find(" - ") + 3 : head.find("]")])
          actor_id = head[
              head.find(filename[:-4])
              + len(filename[:-4])
              + 1 : head.find(filename[:-4])
              + len(filename[:-4])
              + 5
          ]
          emo = head[head.find("\t[") - 3 : head.find("\t[")]
          vad = head[head.find("\t[") + 1 :]
  
          v = float(vad[1:7])
          a = float(vad[9:15])
          d = float(vad[17:23])
  
          j = 1
          emos = []
          while g[j][0] == "C":
              head = g[j]
              start_idx = head.find("\t") + 1
              evoluator_emo = []
              idx = head.find(";", start_idx)
              while idx != -1:
                  evoluator_emo.append(
                      head[start_idx:idx].strip().lower()[:3]
                  )
                  start_idx = idx + 1
                  idx = head.find(";", start_idx)
              emos.append(evoluator_emo)
              j += 1
  
          emotion.append(
              {
                  "start": start_time,
                  "end": end_time,
                  "id": filename[:-4] + "_" + actor_id,
                  "v": v,
                  "a": a,
                  "d": d,
                  "emotion": emo,
                  "emo_evo": emos,
              }
          )
      return emotion
  
file_path: delta/egs/iemocap/emo/v1/local/python/helper.py
imports: import os
  import csv
  import wave
  import sys
  import numpy
  import pandas
  import glob
  from tensorflow.keras.preprocessing.text import text_to_word_sequence
label_desc: Use image node_id 8 for calling a global function with example usage: get_emotions(path_to_emotions, filename) and returns: emotion