code: def test_group_by_group_by_key():
      common_key_values = [
          {1: 1, "key": "value"},
          {2: 2, "key": "value"},
          {3: 3, "key": "value"},
          {4: 4, "key": "value2"},
          {5: 5, "key": "value2"},
          {6: 6, "key": "value3"},
      ]
      d = {
          "value": [
              {1: 1, "key": "value"},
              {2: 2, "key": "value"},
              {3: 3, "key": "value"},
          ],
          "value2": [{4: 4, "key": "value2"}, {5: 5, "key": "value2"}],
          "value3": [{6: 6, "key": "value3"}],
      }
      assert _group_by(common_key_values, "key") == d
  
imports: import pytest
  import numpy
  from sklearn_evaluation.util import _can_iterate, is_column_vector, is_row_vector, _group_by, _product, _mapping_to_tuple_pairs, map_parameters_in_fn_call
label_desc: Use image node_id 12 for calling a global function with example usage: test_group_by_group_by_key() without return types