code: def _validate_training_df(self, df):
      df_columns = df.columns
  
      # validate date_col
      if self.date_col not in df_columns:
          raise ForecasterException(
              "DataFrame does not contain `date_col`: {}".format(
                  self.date_col
              )
          )
  
      # validate ordering of time series
      date_array = pd.to_datetime(df[self.date_col]).reset_index(
          drop=True
      )
      if not is_ordered_datetime(date_array):
          raise ForecasterException(
              "Datetime index must be ordered and not repeat"
          )
  
      if not is_even_gap_datetime(date_array):
          warnings.warn("Datetime index is not evenly distributed")
  
      # validate response variable is in df
      if self.response_col not in df_columns:
          raise ForecasterException(
              "DataFrame does not contain `response_col`: {}".format(
                  self.response_col
              )
          )
  
imports: from copy import deepcopy
  import numpy
  import pandas
  import warnings
  from enum import Enum
  from typing import Dict, Any
  from ..exceptions import ForecasterException, AbstractMethodException, IllegalArgument
  from ..utils.general import is_ordered_datetime, is_even_gap_datetime
  from ..template.model_template import ModelTemplate
  from ..estimators.stan_estimator import StanEstimatorMCMC
  from ..constants.constants import TrainingMetaKeys, PredictionMetaKeys
label_desc: Use image node_id 9 for calling the Forecaster obj's underlying member method code with example usage: obj._validate_training_df(df) without return types