code: def test_H_deprecated_from_time_series(self):
      # GH#52536
      msg = "'H' is deprecated and will be removed in a future version."
      with tm.assert_produces_warning(FutureWarning, match=msg):
          period_range(freq="2H", start="1/1/2001", end="12/1/2009")
  
imports: import numpy
  import pytest
  from pandas import NaT, Period, PeriodIndex, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestPeriodRangeDisallowedFreqs obj's underlying member method code with example usage: obj.test_H_deprecated_from_time_series() without return types