code: def test_iter_by() -> None:
      assert [
          [],
          [GK.USER],
          [GK.RAM],
          [GK.HOSTNAME],
          [GK.USER, GK.RAM],
          [GK.TIMESTAMP],
          [GK.USER, GK.HOSTNAME],
          [GK.HOSTNAME, GK.RAM],
          [GK.USER, GK.TIMESTAMP],
          [GK.TIMESTAMP, GK.RAM],
          [GK.USER, GK.HOSTNAME, GK.RAM],
          [GK.HOSTNAME, GK.TIMESTAMP],
          [GK.USER, GK.TIMESTAMP, GK.RAM],
          [GK.USER, GK.HOSTNAME, GK.TIMESTAMP],
          [GK.HOSTNAME, GK.TIMESTAMP, GK.RAM],
          [GK.USER, GK.HOSTNAME, GK.TIMESTAMP, GK.RAM],
      ] == list(
          _iter_by(
              [
                  GK.USER,
                  GK.HOSTNAME,
                  GK.TIMESTAMP,
                  GK.RAM,
              ]
          )
      )
  
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 1 for calling a global function with example usage: test_iter_by() without return types