code: def test_seq_mixed(self):
      expected = {
          "entity": {
              "false_positives": 4,
              "false_negatives": 4,
              "true_positives": 6,
              "precision": 0.6,
              "recall": 0.6,
              "f1-score": 0.6,
          },
          "date": {
              "false_positives": 4,
              "false_negatives": 4,
              "true_positives": 6,
              "precision": 0.6,
              "recall": 0.6,
              "f1-score": 0.6,
          },
          "micro-f1": 0.6,
          "macro-f1": 0.6,
          "weighted-f1": 0.6,
      }
      Y_mixed_overlap = self.Y_false_pos[:4] + self.Y_overlap[:6]
      Y_mixed_extra_overlap = (
          self.Y_false_pos[:4] + self.Y_extra_overlap[:6]
      )
      Y_mixed_exact = self.Y_false_pos[:4] + self.Y_true[:6]
      for y_set in [
          Y_mixed_overlap,
          Y_mixed_extra_overlap,
          Y_mixed_exact,
      ]:
          self.check_metrics(
              self.Y_true, y_set, expected=expected, span_type="overlap"
          )
  
      # Move 3 predictions from correct to false negative
      Y_mixed_overlap_false_negs = (
          self.Y_false_pos[:4]
          + self.Y_overlap[:3]
          + self.Y_false_neg[:3]
      )
      expected["date"] = {
          "false_positives": 4,
          "false_negatives": 7,
          "true_positives": 3,
          "precision": 0.42857,
          "recall": 0.3,
          "f1-score": 0.353,
      }
      expected["micro-f1"] = 0.4864
      expected["weighted-f1"] = 0.476
      expected["macro-f1"] = 0.476
      self.check_metrics(
          self.Y_true,
          Y_mixed_overlap_false_negs,
          expected=expected,
          span_type="overlap",
      )
      Y_mixed_exact_false_negs = (
          self.Y_false_pos[:4] + self.Y_true[:3] + self.Y_false_neg[:3]
      )
      self.check_metrics(
          self.Y_true,
          Y_mixed_exact_false_negs,
          expected=expected,
          span_type="exact",
      )
      Y_mixed_superset_false_negs = (
          self.Y_false_pos[:4]
          + self.Y_superset[:3]
          + self.Y_false_neg[:3]
      )
      self.check_metrics(
          self.Y_true,
          Y_mixed_superset_false_negs,
          expected=expected,
          span_type="superset",
      )
  
imports: import unittest
  import pytest
  from finetune.util.metrics import seq_recall, seq_precision, get_seq_count_fn, micro_f1, sequence_f1, sequences_overlap
label_desc: Use image node_id 11 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_seq_mixed() without return types