code: def test_deduplicate_metric(self):
      metric_fn = metrics.deduplicate_metric(metrics.accuracy)
      self.assertDictClose(
          metric_fn(
              [
                  {"group": "a", "value": 0},
                  {"group": "a", "value": 0},
                  {"group": "b", "value": 1},
              ],
              [{"value": 0}, {"value": 0}, {"value": 0}],
          ),
          # group a only counts for 1 so we only get 1/2 right.
          {"accuracy": 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 21 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_deduplicate_metric() without return types