code: def test_regularization_holidays():
      log.info("testing: regularization of holidays")
      df = generate_holiday_dataset(
          y_holidays_override=Y_HOLIDAYS_OVERRIDE
      )
      df, _, _ = df_utils.check_dataframe(df, check_y=False)
  
      m = NeuralProphet(
          epochs=20,
          batch_size=64,
          learning_rate=0.1,
          yearly_seasonality=False,
          weekly_seasonality=False,
          daily_seasonality=False,
          growth="off",
      )
      m = m.add_country_holidays("US", regularization=REGULARIZATION)
      m.fit(df, freq="D")
  
      to_reduce = []
      to_preserve = []
      for country_holiday in m.config_country_holidays.holiday_names:
          event_params = m.model.get_event_weights(country_holiday)
          weight_list = [
              param.detach().numpy()
              for _, param in event_params.items()
          ]
          if country_holiday in Y_HOLIDAYS_OVERRIDE.keys():
              to_reduce.append(weight_list[0][0][0])
          else:
              to_preserve.append(weight_list[0][0][0])
      # print(to_reduce)
      # print(to_preserve)
      assert np.mean(to_reduce) < 0.1
      assert np.mean(to_preserve) > 0.5
  
file_path: neural_prophet/tests/test_regularization.py
imports: import logging
  import random
  import numpy
  import pandas
  import pytest
  import torch
  from neuralprophet import NeuralProphet, df_utils
  from neuralprophet.utils import reg_func_abs
  from tests.utils.dataset_generators import generate_event_dataset, generate_holiday_dataset, generate_lagged_regressor_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_regularization_holidays() without return types