code: def test_infer_daily_data(daily_df):
      """Tests on daily data."""
      hi = HolidayInferrer()
      result = hi.infer_holidays(df=daily_df, plot=True)
      # Checks result.
      assert len(result["scores"]) == 55
      assert sorted(result["independent_holidays"]) == sorted(
          [
              ("US", "Labor Day_+0"),
              ("US", "Labor Day_-1"),
              ("US", "Christmas Day_+0"),
              ("US", "Martin Luther King Jr. Day_+0"),
              ("US", "Washington's Birthday_-1"),
              ("US", "Thanksgiving_-2"),
              ("US", "Washington's Birthday_+1"),
              ("US", "Veterans Day_-2"),
              ("US", "Washington's Birthday_+2"),
              ("US", "Christmas Day_+1"),
              ("US", "New Year's Day_+1"),
              ("US", "Memorial Day_+0"),
              ("US", "Veterans Day_+0"),
              ("US", "Veterans Day_-1"),
              ("US", "Washington's Birthday_-2"),
              ("US", "Thanksgiving_-1"),
              ("US", "Labor Day_-2"),
              ("US", "Columbus Day_+0"),
              ("US", "Memorial Day_+1"),
              ("US", "Labor Day_+1"),
              ("US", "Martin Luther King Jr. Day_-1"),
              ("US", "Independence Day_-2"),
              ("US", "Christmas Day_-1"),
              ("US", "Independence Day_-1"),
              ("US", "Martin Luther King Jr. Day_+1"),
              ("US", "Halloween_+0"),
              ("US", "Halloween_+2"),
          ]
      )
  
      assert sorted(result["together_holidays_positive"]) == sorted(
          [
              ("US", "Martin Luther King Jr. Day_+2"),
              ("US", "Labor Day_+2"),
              ("US", "Thanksgiving_+1"),
              ("US", "Memorial Day_+2"),
              ("US", "New Year's Day_-1"),
              ("US", "New Year's Day_-2"),
              ("US", "New Year's Day_+2"),
              ("US", "Halloween_-1"),
              ("US", "Halloween_-2"),
          ]
      )
  
      assert sorted(result["together_holidays_negative"]) == sorted(
          [
              ("US", "Christmas Day_+2"),
              ("US", "Christmas Day_-2"),
              ("US", "Columbus Day_+1"),
              ("US", "Columbus Day_+2"),
              ("US", "Columbus Day_-2"),
              ("US", "Halloween_+1"),
              ("US", "Independence Day_+0"),
              ("US", "Independence Day_+1"),
              ("US", "Martin Luther King Jr. Day_-2"),
              ("US", "Memorial Day_-1"),
              ("US", "Memorial Day_-2"),
              ("US", "New Year's Day_+0"),
              ("US", "Veterans Day_+2"),
          ]
      )
  
      assert len(result["fig"].data) == 6
      # Checks attributes.
      assert hi.df is not None
      assert hi.time_col == TIME_COL
      assert hi.value_col == VALUE_COL
      assert hi.year_start == 2007
      assert hi.year_end == 2016
      assert len(hi.ts) == len(hi.df)
      assert hi.country_holiday_df is not None
      assert len(hi.holidays) == 11
      assert len(hi.score_result) == 55
      assert len(hi.score_result_avg) == 55
      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 4 for calling a global function with example usage: test_infer_daily_data(daily_df) without return types