code: def test_get_daily_event_dict(daily_df):
      """Tests get the daily event dict for all holidays."""
      hi = HolidayInferrer()
  
      # Can not call without inferring holidays or passing parameters manually.
      with pytest.raises(
          ValueError,
          match="Both 'country_holiday_df' and 'holidays' must be given. "
          "Alternatively, you can run 'infer_holidays' first and "
          "they will be pulled automatically.",
      ):
          hi.generate_daily_event_dict()
  
      # Infers holidays and call.
      hi.infer_holidays(df=daily_df)
      daily_event_dict = hi.generate_daily_event_dict()
      assert len(daily_event_dict) == 29
      assert "Holiday_positive_group" in daily_event_dict
      assert "Holiday_negative_group" in daily_event_dict
      # Every single holiday should cover 11 years.
      for holiday, df in daily_event_dict.items():
          if holiday not in [
              "Holiday_positive_group",
              "Holiday_negative_group",
          ]:
              assert df.shape[0] == 11
  
      # With customized input.
      country_holiday_df = get_holiday_df(
          country_list=["US"], years=[2015, 2016]
      )
      holidays = {
          "independent_holidays": [
              ("US", "Christmas Day_+0"),
              ("US", "New Year's Day_-1"),
          ],
          "together_holidays_negative": [
              ("US", "Memorial Day_+2"),
              ("US", "Labor Day_+0"),
          ],
          "together_holidays_positive": [],
      }
      daily_event_dict = hi.generate_daily_event_dict(
          country_holiday_df=country_holiday_df, holiday_result=holidays
      )
      assert len(daily_event_dict) == 3
      assert "US_Christmas Day" in daily_event_dict
      assert "US_New Years Day_minus_1" in daily_event_dict
      assert "Holiday_negative_group" in daily_event_dict
      assert "Holiday_positive_group" not in daily_event_dict
      assert daily_event_dict["US_Christmas Day"].equals(
          pd.DataFrame(
              {
                  EVENT_DF_DATE_COL: pd.to_datetime(
                      ["2016-12-25", "2015-12-25"]
                  ),
                  EVENT_DF_LABEL_COL: "US_Christmas Day",
              }
          )
      )
      assert daily_event_dict["US_New Years Day_minus_1"].equals(
          pd.DataFrame(
              {
                  EVENT_DF_DATE_COL: pd.to_datetime(
                      ["2015-12-31", "2014-12-31"]
                  ),
                  EVENT_DF_LABEL_COL: "US_New Years Day_minus_1",
              }
          )
      )
      assert daily_event_dict["Holiday_negative_group"].equals(
          pd.DataFrame(
              {
                  EVENT_DF_DATE_COL: pd.to_datetime(
                      [
                          "2016-06-01",
                          "2015-05-27",
                          "2016-09-05",
                          "2015-09-07",
                      ]
                  ),
                  EVENT_DF_LABEL_COL: "event",
              }
          )
      )
  
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 13 for calling a global function with example usage: test_get_daily_event_dict(daily_df) without return types