code: def test_inplace(df):
      """Raise Key Error if inplace is True in sort_values_kwargs"""
      with pytest.raises(KeyError):
          df.groupby_topk("result", "age", 1, {"inplace": True})
  
file_path: pyjanitor/tests/functions/test_groupby_topk.py
imports: import pandas
  import pytest
  from pandas.testing import assert_frame_equal
label_desc: Use image node_id 9 for calling a global function with example usage: test_inplace(df) without return types