code: def test_take_fill_value_new_raises(self):
      # https://github.com/pandas-dev/pandas/issues/23296
      cat = Categorical(["a", "b", "c"])
      xpr = r"Cannot setitem on a Categorical with a new category \(d\)"
      with pytest.raises(TypeError, match=xpr):
          cat.take([0, 1, -1], fill_value="d", allow_fill=True)
  
file_path: pandas/pandas/tests/arrays/categorical/test_take.py
imports: import numpy
  import pytest
  from pandas import Categorical
  import pandas._testing
label_desc: Use image node_id 10 for calling the TestTake obj's underlying member method code with example usage: obj.test_take_fill_value_new_raises() without return types