code: def get_max_num_lags(
      config_lagged_regressors: Optional[ConfigLaggedRegressors],
      n_lags: int,
  ) -> int:
      """Get the greatest number of lags between the autoregression lags and the covariates lags.
  
      Parameters
      ----------
          config_lagged_regressors : configure.ConfigLaggedRegressors
              Configurations for lagged regressors
          n_lags : int
              number of lagged values of series to include as model inputs
  
      Returns
      -------
          int
              Maximum number of lags between the autoregression lags and the covariates lags.
      """
      if config_lagged_regressors is not None:
          log.debug("config_lagged_regressors exists")
          max_n_lags = max(
              [n_lags]
              + [
                  val.n_lags
                  for key, val in config_lagged_regressors.items()
              ]
          )
      else:
          log.debug("config_lagged_regressors does not exist")
          max_n_lags = n_lags
      return max_n_lags
  
imports: from __future__ import annotations
  import logging
  import math
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, List, Optional, Tuple
  import numpy
  import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: get_max_num_lags(config_lagged_regressors, n_lags) and returns: max_n_lags