code: def test_set_lags_when_differentiation_is_not_None():
      """
      Test how `window_size` is also updated when the forecaster includes differentiation.
      """
      lags = 5
      differentiation = 1
  
      forecaster = ForecasterAutoreg(
          regressor=LinearRegression(),
          lags=lags,
          differentiation=differentiation,
      )
  
      forecaster.set_lags(lags=lags)
  
      assert (forecaster.lags == np.array([1, 2, 3, 4, 5])).all()
      assert forecaster.max_lag == 5
      assert forecaster.window_size == lags + differentiation
  
file_path: skforecast/skforecast/ForecasterAutoreg/tests/test_set_lags.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 4 for calling a global function with example usage: test_set_lags_when_differentiation_is_not_None() without return types