code: def test_sub_daily_data():
      """Tests on sub daily data."""
      np.random.seed(123)
      df = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  "2020-01-01", freq="H", periods=24 * 365
              ),
              VALUE_COL: list(range(24 * 365))
              + np.random.randn(24 * 365),
          }
      )
      hi = HolidayInferrer()
      result = hi.infer_holidays(df=df, plot=True)
      # Checks result.
      assert len(result["scores"]) == 60
      assert len(result["fig"].data) == 6
      assert len(result["independent_holidays"]) == 7
      assert len(result["together_holidays_negative"]) == 0
      assert len(result["together_holidays_positive"]) == 1
      # Checks attributes.
      assert hi.df is not None
      assert hi.time_col == TIME_COL
      assert hi.value_col == VALUE_COL
      assert hi.year_start == 2020
      assert hi.year_end == 2020
      assert len(hi.ts) == len(hi.df)
      assert hi.country_holiday_df is not None
      assert len(hi.holidays) == 12
      assert len(hi.score_result) == 60
      assert len(hi.score_result_avg) == 60
      assert hi.result == result
  
imports: import numpy
  import pandas
  import pytest
  from holidays_ext.get_holidays import get_holiday_df
  from testfixtures import LogCapture
  from greykite.algo.common.holiday_inferrer import HolidayInferrer
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.logging import LOGGER_NAME
label_desc: Use image node_id 6 for calling a global function with example usage: test_sub_daily_data() without return types