class_docstr: Emotion Task 
code: def __init__(self, config, mode):
      super().__init__(config, mode)
      # for dev, test dataset split
      self._dev_size = 0.0
      self._test_size = 0.0
  
      # self.dataconf = self.processdataconf(config)
      self.dataconf = self.config["data"]
      self.taskconf = self.dataconf["task"]
      self.solverconf = self.config["solver"]
  
      self._data_path = self.dataconf[mode]["paths"]
      logging.info("data_path : {}".format(self._data_path))
      if (
          "segments" in self.dataconf[mode]
          and self.dataconf[mode]["segments"] is not None
      ):
          self._textgrid_path = self.dataconf[mode]["segments"]
      else:
          self._textgrid_path = []
  
      self._file_suffix = self.taskconf["suffix"]
      assert self._file_suffix in [
          ".wav",
          ".npy",
      ], "Only support wav and npy"
      assert isinstance(self._data_path, (tuple, list))
      assert isinstance(self._textgrid_path, (tuple, list))
      assert self._data_path
  
      self.input_type = (
          "samples" if self._file_suffix == ".wav" else "features"
      )
      self._clip_size = self.taskconf["audio"]["clip_size"]  # seconds
      if mode == utils.TRAIN:
          self._stride = self.taskconf["audio"]["stride"]  # percent
      else:
          self._stride = 1.0  # percent
      logging.info("Mode: {}, stride {}".format(mode, self._stride))
      self._feature_type = self.taskconf["audio"]["feature_extractor"]
      self._feature_name = self.taskconf["audio"]["feature_name"]
      logging.info(
          f"feature type: {self._feature_type}, feature name: {self._feature_name}"
      )
      self._sample_rate = self.taskconf["audio"]["sr"]
      self._winstep = self.taskconf["audio"]["winstep"]
      self._feature_size = self.taskconf["audio"]["feature_size"]
      self._input_channels = (
          3 if self.taskconf["audio"]["add_delta_deltas"] else 1
      )
      self._cmvn_path = self.taskconf["audio"]["cmvn_path"]
      self._save_feat_path = self.taskconf["audio"]["save_feat_path"]
  
      # {class: [filename, duration, class],...}
      self._class_file = defaultdict(list)
      self._num_class = 0
      self._classes = self.taskconf["classes"]["vocab"]
      assert self._classes
  
      self._max_text_len = self.taskconf["text"]["max_text_len"]
      self._vocab_path = self.taskconf["text"]["vocab_path"]
      self._epoch = 0
  
      self._class_file_train = None
      self._train_meta = None
      self._train_by_filename = None
      self._class_file_dev = None
      self._class_train_dev_test = None
      self._postive_segs_in_sec = None
      self._train_label_example = None
      self._class_file_test = None
      self._postive_segs = None
      self.data_items = None
  
      # generate segment index
      self.generate_meta(mode)
  
      # load text vocab table
      self.use_text = self.taskconf["text"]["enable"]
      if self.use_text:
          self.load_text_vocab_table()
  
      # use distilling
      self.use_distilling = False
      if "distilling" in self.solverconf:
          self.use_distilling = self.solverconf["distilling"]["enable"]
  
      if self.use_distilling:
          temperature = self.solverconf["distilling"]["temperature"]
          model = self.solverconf["distilling"]["teacher_model"]
          name = self.solverconf["distilling"]["name"]
          self.teacher = registers.serving[name](
              model, None, temperature
          )
  
imports: import re
  import ast
  import os
  import copy
  import threading
  import itertools
  import functools
  import random
  from collections import defaultdict
  import librosa
  import numpy
  import pandas
  import delta.compat
  from absl import logging
  from sklearn.model_selection import train_test_split
  from delta import utils
  from delta.data import feat
  from delta.utils.register import registers
  from delta.data.task.base_speech_task import SpeechTask
label_desc: Use image node_id 1 to create a new SpeechClsTask object from inherited base classes: SpeechTask with example: obj = SpeechClsTask(config, mode)