code: def test_token_mixed(self):
      Y_mixed = self.Y_false_pos[:5] + self.Y_true[:5]
      expected = {
          "entity": {
              "false_positives": 5,
              "false_negatives": 10,
              "true_positives": 10,
              "precision": 0.66666,
              "recall": 0.5,
              "f1-score": 0.571,
          },
          "date": {
              "false_positives": 5,
              "false_negatives": 20,
              "true_positives": 20,
              "precision": 0.8,
              "recall": 0.5,
              "f1-score": 0.6153,
          },
          "micro-f1": 0.6,
          "macro-f1": 0.593,
          "weighted-f1": 0.601,
      }
  
      self.check_metrics(
          self.Y_true,
          Y_mixed,
          expected,
          span_type="token",
      )
  
      # Move some predictions from correct to false negative
      Y_mixed_false_negs = (
          self.Y_false_pos[:5] + self.Y_true[:2] + self.Y_false_neg[:3]
      )
      expected["date"] = {
          "false_positives": 5,
          "false_negatives": 32,
          "true_positives": 8,
          "precision": 0.615,
          "recall": 0.2,
          "f1-score": 0.302,
      }
      expected["micro-f1"] = 0.409
      expected["macro-f1"] = 0.437
      expected["weighted-f1"] = 0.392
      self.check_metrics(
          self.Y_true,
          Y_mixed_false_negs,
          expected,
          span_type="token",
      )
  
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 8 for calling the TestMetrics obj's underlying member method code with example usage: obj.test_token_mixed() without return types