class_docstr: emotion postprocess
class_docstr_tok: ["emotion","postprocess"]
docstr: main func entrypoint
docstr_tok: ["main","func","entrypoint"]
code: def call(self, predictions, log_verbose=False):
      """main func entrypoint"""
      # [true_label, pred_label]
      stats = [np.array([]), np.array([])]
      confusion = np.zeros(
          (self.num_class, self.num_class), dtype=np.int32
      )
  
      pred_results = collections.defaultdict(list)
  
      self.pred_score_path = os.path.join(
          self.output_dir, "predict_scores.txt"
      )
      self.pred_result_path = os.path.join(
          self.output_dir, "predict_results.pkl"
      )
  
      with open(self.pred_score_path, "w") as score_file, open(
          self.pred_result_path, "wb"
      ) as result_file:
          for i, pred in enumerate(predictions):
              if log_verbose or self.log_verbose:
                  logging.info("index: {} pred: {}".format(i, pred))
                  for key, val in pred.items():
                      logging.info(
                          "{}: val: {} type: {}".format(
                              key, val, type(val)
                          )
                      )
  
              if self.eval:
                  confusion = self.update_metrics(pred, confusion)
                  stats = self.update_stats(pred, stats)
  
              if self.infer:
                  self.collect_results(pred, pred_results, score_file)
  
          if self.infer:
              pickle.dump(pred_results, result_file)
  
      if self.eval:
          self.log_metrics(stats)
  
      if self.infer:
          self.post_proc_results(pred_results, self.thresholds)
  
file_path: delta/delta/utils/postprocess/speech_cls_proc.py
imports: import os
  import pickle
  import collections
  import numpy
  from absl import logging
  from sklearn.metrics import confusion_matrix
  from delta import utils
  from delta.utils.postprocess.base_postproc import PostProc
  from delta.utils.register import registers
label_desc: Use image node_id 7 for calling the EmoPostProc obj's underlying member method code with example usage: obj.call(predictions, log_verbose) without return types