code: def _check_and_correct_lags(self, time_series: np.array):
      previous_lag_1 = int(self.params.get("lag_1"))
      previous_lag_2 = int(self.params.get("lag_2"))
      max_lag = len(time_series) // 2 - 1
      new_lag_1 = self._check_and_correct_lag(max_lag, previous_lag_1)
      new_lag_2 = self._check_and_correct_lag(max_lag, previous_lag_2)
      if new_lag_1 == new_lag_2:
          new_lag_2 -= 1
      prefix = "Warning: lag of AutoRegImplementation was changed"
      if previous_lag_1 != new_lag_1:
          self.log.info(
              f"{prefix} from {previous_lag_1} to {new_lag_1}."
          )
          self.params.update(lag_1=new_lag_1)
      if previous_lag_2 != new_lag_2:
          self.log.info(
              f"{prefix} from {previous_lag_2} to {new_lag_2}."
          )
          self.params.update(lag_2=new_lag_2)
  
imports: from copy import copy
  import numpy
  import statsmodels.api
  from statsmodels.genmod.families import Gamma, Gaussian, InverseGaussian
  from statsmodels.genmod.families.links import identity, inverse_power, inverse_squared, log
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.tsa.ar_model import AutoReg
  from statsmodels.tsa.exponential_smoothing.ets import ETSModel
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.evaluation.operation_implementations.data_operations.ts_transformations import ts_to_table
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import ModelImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
  from fedot.core.repository.dataset_types import DataTypesEnum
label_desc: Use image node_id 5 for calling the AutoRegImplementation obj's underlying member method code with example usage: obj._check_and_correct_lags(time_series) without return types