class_docstr: python metrix unittest 
class_docstr_tok: ["python","metrix","unittest"]
code: def setUp(self):
      super().setUp()
      """ setup """
      package_root = Path(PACKAGE_ROOT_DIR)
      self.config_file_crf = package_root.joinpath(
          "../egs/mock_text_seq_label_data/seq-label/v1/config/seq-label-mock.yml"
      )
  
      self.conf_str = """
        solver:
          metrics:
            pos_label: 1 # int, same to sklearn
            cals:
            - name: AccuracyCal
              arguments: null 
            - name: ConfusionMatrixCal
              arguments: null
            - name: PrecisionCal
              arguments:
                average: 'micro'
            - name: RecallCal
              arguments:
                average: 'micro'
            - name: F1ScoreCal
              arguments:
                average: 'micro'
      """
  
      self.conf_file = tempfile.mktemp(suffix="metric.yaml")
      with open(
          self.conf_file, "w", encoding="utf-8"
      ) as f:  # pylint: disable=invalid-name
          f.write(self.conf_str)
  
      self.true_label = np.array([1, 1, 2, 3, 4, 6, 5])
      self.pred1 = np.array([1, 1, 2, 3, 4, 6, 5])
      self.pred2 = np.array([2, 2, 1, 1, 1, 1, 1])
  
      # config for test token error metircs
      self.token_conf_str = """
        solver:
          metrics:
            pos_label: 1 # int, same to sklearn
            cals:
            - name: TokenErrCal
              arguments:
                eos_id: 0
      """
  
      self.token_conf_file = tempfile.mktemp(suffix="token.yaml")
      with open(
          self.token_conf_file, "w", encoding="utf-8"
      ) as f:  # pylint: disable=invalid-name
          f.write(self.token_conf_str)
  
      self.token_true_label = [[1, 1, 1, 1], [1, 3, 4, 5]]
      self.token_pred1 = [[1, 1, 1, 1], [1, 3, 4, 5]]
      self.token_pred2 = [[1, 2, 2, 2], [1, 0, 0, 0]]
  
file_path: delta/delta/utils/metrics/py_metrics_test.py
imports: import os
  from pathlib import Path
  import tempfile
  import numpy
  import delta.compat
  from delta import utils
  from delta.utils import metrics
  from delta import PACKAGE_ROOT_DIR
label_desc: Use image node_id 1 for calling the MetricTest obj's underlying member method code with example usage: obj.setUp() without return types