code: def custom_weights(index):  # pragma: no cover
      """
      Return 0 if index is one of '2022-01-05', '2022-01-06', 1 otherwise.
      """
      weights = np.where((index >= 20) & (index <= 40), 0, 1)
  
      return weights
  
file_path: skforecast/skforecast/ForecasterAutoreg/tests/test_fit.py
imports: import numpy
  import pandas
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from sklearn.linear_model import LinearRegression
  from .fixtures_ForecasterAutoreg import y
label_desc: Use image node_id 1 for calling a global function with example usage: custom_weights(index) and returns: weights