code: def test_CBH_deprecated(self):
      msg = (
          "'CBH' is deprecated and will be removed in a future version."
      )
  
      with tm.assert_produces_warning(FutureWarning, match=msg):
          expected = date_range(
              dt.datetime(2022, 12, 11),
              dt.datetime(2022, 12, 13),
              freq="CBH",
          )
      result = DatetimeIndex(
          [
              "2022-12-12 09:00:00",
              "2022-12-12 10:00:00",
              "2022-12-12 11:00:00",
              "2022-12-12 12:00:00",
              "2022-12-12 13:00:00",
              "2022-12-12 14:00:00",
              "2022-12-12 15:00:00",
              "2022-12-12 16:00:00",
          ],
          dtype="datetime64[ns]",
          freq="cbh",
      )
  
      tm.assert_index_equal(result, expected)
  
imports: import datetime
  from datetime import date
  import re
  import numpy
  import pytest
  from pandas.compat.numpy import np_long
  import pandas
  from pandas import DataFrame, DatetimeIndex, Index, Timestamp, date_range, offsets
  import pandas._testing
label_desc: Use image node_id 12 for calling the TestDatetimeIndex obj's underlying member method code with example usage: obj.test_CBH_deprecated() without return types