code: def test_f1_score_with_invalid(self):
      self.assertDictClose(
          metrics.f1_score_with_invalid([0, 1, 1, 0], [0, 1, 2, 2]),
          {"f1": 50.0},
      )
  
imports: from unittest import mock
  from absl.testing import absltest
  import numpy
  import seqio
  import sklearn.metrics
  from t5.evaluation import metrics
  from t5.evaluation import test_utils
label_desc: Use image node_id 19 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_f1_score_with_invalid() without return types