code: def test_take_invalid_kwargs(self, index):
      indices = [1, 2]
  
      msg = r"take\(\) got an unexpected keyword argument 'foo'"
      with pytest.raises(TypeError, match=msg):
          index.take(indices, foo=2)
  
      msg = "the 'out' parameter is not supported"
      with pytest.raises(ValueError, match=msg):
          index.take(indices, out=indices)
  
      msg = "the 'mode' parameter is not supported"
      with pytest.raises(ValueError, match=msg):
          index.take(indices, mode="clip")
  
imports: import numpy
  import pytest
  from pandas.errors import InvalidIndexError
  from pandas.core.dtypes.common import is_float_dtype, is_scalar
  from pandas import NA, DatetimeIndex, Index, IntervalIndex, MultiIndex, NaT, PeriodIndex, TimedeltaIndex
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestTake obj's underlying member method code with example usage: obj.test_take_invalid_kwargs(index) without return types