code: def test_group_by_using_fn():
      requires_fn = [
          {"k": "v   "},
          {"k": "     v   "},
          {"k": "v   "},
          {"k": "v2   "},
          {"k": "v2"},
          {"k": " v2     "},
      ]
      d = {
          "v": [{"k": "v   "}, {"k": "     v   "}, {"k": "v   "}],
          "v2": [{"k": "v2   "}, {"k": "v2"}, {"k": " v2     "}],
      }
      assert _group_by(requires_fn, lambda d: d["k"].strip()) == 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 13 for calling a global function with example usage: test_group_by_using_fn() without return types