code: def test_contains_nat(self):
      # see gh-13582
      idx = period_range("2007-01", freq="M", periods=10)
      assert NaT not in idx
      assert None not in idx
      assert float("nan") not in idx
      assert np.nan not in idx
  
      idx = PeriodIndex(["2011-01", "NaT", "2011-02"], freq="M")
      assert NaT in idx
      assert None in idx
      assert float("nan") in idx
      assert np.nan in idx
  
imports: from datetime import datetime
  import re
  import numpy
  import pytest
  from pandas._libs.tslibs import period
  from pandas.errors import InvalidIndexError
  import pandas
  from pandas import DatetimeIndex, NaT, Period, PeriodIndex, Series, Timedelta, date_range, notna, period_range
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestContains obj's underlying member method code with example usage: obj.test_contains_nat() without return types