code: def test_sklearn_wrapper(self):
      mae_fn = metrics.sklearn_metrics_wrapper("mean_absolute_error")
      y_true = [[0.5, 1], [-1, 1], [7, -6]]
      y_pred = [[0, 2], [-1, 2], [8, -5]]
      self.assertDictClose(
          mae_fn(y_true, y_pred),
          {
              "mean_absolute_error": sklearn.metrics.mean_absolute_error(
                  y_true, y_pred
              )
          },
      )
  
      hamming_fn = metrics.sklearn_metrics_wrapper(
          "hamming_loss",
          metric_dict_str="hamming_100x",
          metric_post_process_fn=lambda x: 100 * x,
      )
      y_true = [1, 2, 3, 4]
      y_pred = [2, 2, 3, 4]
      self.assertDictClose(
          hamming_fn(y_true, y_pred),
          {
              "hamming_100x": 100
              * sklearn.metrics.hamming_loss(y_true, y_pred)
          },
      )
  
      y_true = [0, 0, 2, 1]
      y_pred = [0, 1, 2, 1]
      matthews_corrcoef_fn = metrics.sklearn_metrics_wrapper(
          "matthews_corrcoef", metric_post_process_fn=lambda x: 100 * x
      )
      self.assertDictClose(
          matthews_corrcoef_fn(y_true, y_pred),
          {"matthews_corrcoef": 70.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 29 for calling the MetricsTest obj's underlying member method code with example usage: obj.test_sklearn_wrapper() without return types