code: def test_apply_one_grouper(df):
      res = GroupBy(["a"]).apply(df, lambda x: x.sort_values("x"))
      assert_array_equal(res.index, [0, 1, 2, 3, 4])
      assert_array_equal(res.columns, ["a", "b", "x", "y"])
      assert_array_equal(res["a"], ["a", "a", "a", "b", "b"])
      assert_array_equal(res["b"], ["g", "h", "f", "f", "h"])
      assert_array_equal(res["x"], [1, 1, 2, 2, 3])
  
file_path: seaborn/tests/_core/test_groupby.py
imports: import numpy
  import pandas
  import pytest
  from numpy.testing import assert_array_equal
  from seaborn._core.groupby import GroupBy
label_desc: Use image node_id 10 for calling a global function with example usage: test_apply_one_grouper(df) without return types