code: def test_group(
      spec: GroupingSpec,
      expected: Sequence[
          Tuple[Tuple[str, ...], pd.DataFrame, Collection[Plotter]]
      ],
  ) -> None:
      actual = group(METRICS_DF, [PL1, PL2], [BM1, BM2], spec)
  
      assert len(expected) == len(actual)
      for expected_gr, actual_gr in zip(expected, actual):
          expected_key, expected_df, expected_plotters = expected_gr
          actual_key, actual_df, actual_plotters = actual_gr
  
          assert expected_key == actual_key
          pd.testing.assert_frame_equal(
              expected_df, actual_df.reset_index(drop=True)
          )
          assert expected_plotters == list(actual_plotters)
  
file_path: GPflow/tests/benchmark/test_grouping.py
imports: from typing import Collection, Sequence, Tuple
  from unittest.mock import Mock
  import pandas
  import pytest
  from benchmark.grouping import GroupingKey
  from benchmark.grouping import GroupingSpec, _iter_by, group
  from benchmark.metadata import BenchmarkMetadata
  from benchmark.plotter_api import Plotter
label_desc: Use image node_id 2 for calling a global function with example usage: test_group(spec, expected) without return types