class_docstr: A template for :class: `~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator`.
      
class_docstr_tok: ["A","template","for",":","class",":","`","~greykite.sklearn.estimator.lag_based_estimator.LagBasedEstimator","`","."]
docstr: Decorator for ``apply_template_for_pipeline_params`` function.
  
  Overrides the method in `~greykite.framework.templates.base_template.BaseTemplate`.
  
  Raises
  ------
  ValueError if config.model_template != "LAG_BASED"
docstr_tok: ["Decorator","for","``","apply_template_for_pipeline_params","``","function",".","Overrides","the","method","in","`","~greykite.framework.templates.base_template.BaseTemplate","`",".","Raises","--","--","--","ValueError","if","config.model_template","!","=","``","LAG_BASED","''"]
code: def apply_template_decorator(func):
      """Decorator for ``apply_template_for_pipeline_params`` function.
  
      Overrides the method in `~greykite.framework.templates.base_template.BaseTemplate`.
  
      Raises
      ------
      ValueError if config.model_template != "LAG_BASED"
      """
  
      @functools.wraps(func)
      def process_wrapper(
          self,
          df: pd.DataFrame,
          config: Optional[ForecastConfig] = None,
      ):
          # sets defaults
          config = self.apply_forecast_config_defaults(config)
          # input validation
          if config.model_template != "LAG_BASED":
              raise ValueError(
                  f"LagBasedTemplate only supports config.model_template='LAG_BASED', "
                  f"found '{config.model_template}'"
              )
          pipeline_params = func(self, df, config)
          return pipeline_params
  
      return process_wrapper
  
imports: import functools
  from typing import Dict
  from typing import Optional
  import pandas
  from greykite.common.aggregation_function_enum import AggregationFunctionEnum
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import dictionaries_values_to_lists
  from greykite.common.python_utils import update_dictionaries
  from greykite.common.python_utils import update_dictionary
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.base_template import BaseTemplate
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
  from greykite.sklearn.estimator.lag_based_estimator import LagBasedEstimator
  from greykite.sklearn.estimator.lag_based_estimator import LagUnitEnum
label_desc: Use image node_id 7 for calling the LagBasedTemplate obj's underlying member method code with example usage: obj.apply_template_decorator(func) and returns: process_wrapper, pipeline_params