code: def test_glue_average(self):
      mets = eval_utils.METRIC_NAMES.items()
      glue_metric_names = [
          v.name
          for k, v in mets
          if k.startswith("glue") and "average" not in k
      ]
      super_glue_metric_names = [
          v.name
          for k, v in mets
          if k.startswith("super") and "average" not in k
      ]
      extra_metric_names = ["Fake metric", "Average GLUE Score"]
      columns = (
          glue_metric_names
          + super_glue_metric_names
          + extra_metric_names
      )
      n_total_metrics = len(columns)
      df = pd.DataFrame(
          [np.arange(n_total_metrics), 2 * np.arange(n_total_metrics)],
          columns=columns,
      )
      df = eval_utils.compute_avg_glue(df)
      expected_glue = (
          0
          + 1
          + (2 + 3) / 2.0
          + (4 + 5) / 2.0
          + (6 + 7) / 2.0
          + (8 + 9) / 2.0
          + 10
          + 11
      ) / 8.0
      self.assertSequenceAlmostEqual(
          df["Average GLUE Score"], [expected_glue, 2 * expected_glue]
      )
      expected_super = (
          12
          + (13 + 14) / 2.0
          + 15
          + (16 + 17) / 2.0
          + (18 + 19) / 2.0
          + 20
          + 21
          + 22
      ) / 8.0
      self.assertSequenceAlmostEqual(
          df["Average SuperGLUE Score"],
          [expected_super, 2 * expected_super],
      )
      del df["CoLA"]
      del df["Average GLUE Score"]
      df = eval_utils.compute_avg_glue(df)
      self.assertNoCommonElements(df.columns, ["Average GLUE Score"])
  
file_path: text-to-text-transfer-transformer/t5/evaluation/eval_utils_test.py
imports: import collections
  import os
  from absl.testing import absltest
  import numpy
  import pandas
  import seqio
  from t5.evaluation import eval_utils
  import tensorflow.compat.v1
label_desc: Use image node_id 5 for calling the EvalUtilsTest obj's underlying member method code with example usage: obj.test_glue_average() without return types