code: def test_set_index_raise_on_type(
      self, frame_of_index_cols, drop, append
  ):
      box = set
      df = frame_of_index_cols
  
      msg = 'The parameter "keys" may be a column key, .*'
      # forbidden type, e.g. set
      with pytest.raises(TypeError, match=msg):
          df.set_index(box(df["A"]), drop=drop, append=append)
  
      # forbidden type in list, e.g. set
      with pytest.raises(TypeError, match=msg):
          df.set_index(
              ["A", df["A"], box(df["A"])], drop=drop, append=append
          )
  
imports: from datetime import datetime, timedelta
  import numpy
  import pytest
  from pandas import Categorical, CategoricalIndex, DataFrame, DatetimeIndex, Index, MultiIndex, Series, date_range, period_range, to_datetime
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestSetIndexInvalid obj's underlying member method code with example usage: obj.test_set_index_raise_on_type(frame_of_index_cols, drop, append) without return types