code: def test_contains(self):
      # GH#21508
      cat = Categorical(list("aabbca"), categories=list("cab"))
  
      assert "b" in cat
      assert "z" not in cat
      assert np.nan not in cat
      with pytest.raises(TypeError, match="unhashable type: 'list'"):
          assert [1] in cat
  
      # assert codes NOT in index
      assert 0 not in cat
      assert 1 not in cat
  
      cat = Categorical(
          list("aabbca") + [np.nan], categories=list("cab")
      )
      assert np.nan in cat
  
imports: import math
  import numpy
  import pytest
  from pandas import NA, Categorical, CategoricalIndex, Index, Interval, IntervalIndex, NaT, PeriodIndex, Series, Timedelta, Timestamp
  import pandas._testing
  import pandas.core.common
label_desc: Use image node_id 1 for calling the TestContains obj's underlying member method code with example usage: obj.test_contains() without return types