code: def test_errors(daily_df):
      """Tests errors."""
      hi = HolidayInferrer()
      with pytest.raises(
          ValueError,
          match="Both 'post_search_days' and 'pre_search_days' must be non-negative integers.",
      ):
          hi.infer_holidays(df=daily_df, post_search_days=-1)
      with pytest.raises(
          ValueError,
          match="Both 'independent_holiday_thres' and 'together_holiday_thres' must be between "
          "0 and 1 \\(inclusive\\).",
      ):
          hi.infer_holidays(df=daily_df, independent_holiday_thres=80)
  
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 7 for calling a global function with example usage: test_errors(daily_df) without return types