code: def test_get_scores():
      """Tests the scoring functions."""
      hi = HolidayInferrer()
      # Different values on christmas/New year.
      df = pd.DataFrame(
          {
              "ts": pd.date_range("2020-12-01", freq="D", periods=40),
              "y": [1] * 22
              + [2, 3, 4, 3, 2, 1, 1, 2, 3, 4, 3, 2]
              + [1] * 6,
          }
      )
      result = hi.infer_holidays(df=df, use_relative_score=False)
      assert result["scores"]["US_Christmas Day_-2"] == [0.5]
      assert result["scores"]["US_Christmas Day_-1"] == [1.0]
      assert result["scores"]["US_Christmas Day_+0"] == [3.0]
      assert result["scores"]["US_Christmas Day_+1"] == [1.0]
      assert result["scores"]["US_Christmas Day_+2"] == [0.5]
      assert result["scores"]["US_New Year's Day_-2"] == [0.5]
      assert result["scores"]["US_New Year's Day_-1"] == [1.0]
      assert result["scores"]["US_New Year's Day_+0"] == [3.0]
      assert result["scores"]["US_New Year's Day_+1"] == [1.0]
      assert result["scores"]["US_New Year's Day_+2"] == [0.0]
  
      # Tests the relative scores
      result = hi.infer_holidays(df=df, use_relative_score=True)
      assert result["scores"]["US_Christmas Day_-2"] == [1 / 3]
      assert result["scores"]["US_Christmas Day_-1"] == [0.5]
      assert result["scores"]["US_Christmas Day_+0"] == [3.0]
      assert result["scores"]["US_Christmas Day_+1"] == [0.5]
      assert result["scores"]["US_Christmas Day_+2"] == [1 / 3]
      assert result["scores"]["US_New Year's Day_-2"] == [1 / 3]
      assert result["scores"]["US_New Year's Day_-1"] == [0.5]
      assert result["scores"]["US_New Year's Day_+0"] == [3.0]
      assert result["scores"]["US_New Year's Day_+1"] == [0.5]
      assert result["scores"]["US_New Year's Day_+2"] == [0.0]
  
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 9 for calling a global function with example usage: test_get_scores() without return types