class_docstr: Emotion Task 
docstr: dirnames under dataset is class name
  all data_path have same dirnames 
docstr_tok: ["dirnames","under","dataset","is","class","name","all","data_path","have","same","dirnames"]
code: def get_class_files_duration(self):
      """dirnames under dataset is class name
      all data_path have same dirnames"""
      classes = None
      for root, dirnames, filenames in os.walk(self._data_path[0]):
          classes = dirnames
          break
  
      assert classes, "can not acsess {}".format(self._data_path[0])
      assert set(classes) == set(self._classes.keys()), "{} {}".format(
          classes, self._classes.keys()
      )
  
      def _get_class(path):
          ret = None
          for cls in self._classes:
              if cls in path:
                  ret = cls
          return ret
  
      # to exclude some data under some dir
      excludes = []
      # pylint: disable=too-many-nested-blocks
      for data_path in self._data_path:
          logging.debug("data path: {}".format(data_path))
          for root, dirname, filenames in os.walk(data_path):
              del dirname
              for filename in filenames:
                  if filename.endswith(self._file_suffix):
                      class_name = _get_class(
                          root
                      )  # 'conflict' or 'normal' str
                      assert class_name is not None
                      filename = os.path.join(root, filename)
  
                      if excludes:
                          for exclude in excludes:
                              if exclude in filename:
                                  pass
  
                      duration = self.get_duration(
                          filename=filename, sr=self._sample_rate
                      )
                      self._class_file[class_name].append(
                          (filename, duration, class_name)
                      )
                  else:
                      pass
  
      if not self._class_file:
          logging.debug("class file: {}".format(self._class_file))
          logging.warn(
              "maybe the suffix {} file not exits".format(
                  self._file_suffix
              )
          )
  
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 16 for calling the SpeechClsTask obj's underlying member method code with example usage: obj.get_class_files_duration() and returns: ret