code: def test_contains_freq_mismatch(self):
      rng = period_range("2007-01", freq="M", periods=10)
  
      assert Period("2007-01", freq="M") in rng
      assert Period("2007-01", freq="D") not in rng
      assert Period("2007-01", freq="2M") not in rng
  
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 2 for calling the TestContains obj's underlying member method code with example usage: obj.test_contains_freq_mismatch() without return types