code: def test_stat_unexpected_keyword(self, frame_or_series):
      obj = construct(frame_or_series, 5)
      starwars = "Star Wars"
      errmsg = "unexpected keyword"
  
      with pytest.raises(TypeError, match=errmsg):
          obj.max(epic=starwars)  # stat_function
      with pytest.raises(TypeError, match=errmsg):
          obj.var(epic=starwars)  # stat_function_ddof
      with pytest.raises(TypeError, match=errmsg):
          obj.sum(epic=starwars)  # cum_function
      with pytest.raises(TypeError, match=errmsg):
          obj.any(epic=starwars)
  
imports: from copy import copy, deepcopy
  import numpy
  import pytest
  from pandas.core.dtypes.common import is_scalar
  from pandas import DataFrame, Index, Series, date_range
  import pandas._testing
label_desc: Use image node_id 8 for calling the TestGeneric obj's underlying member method code with example usage: obj.test_stat_unexpected_keyword(frame_or_series) without return types