code: def _check_enforcements(forecaster, experiment) -> bool:
      """Checks whether the model supports certain features such as
      (1) Prediction Interval, and (2) support for exogenous variables. The checks
      depend on what features are requested by the user during the experiment setup.
  
      Parameters
      ----------
      forecaster : sktime compatible forecaster
          The forecaster which needs to be checked for feature support
      experiment : TSForecastingExperiment
          Used to check what features are requested by the user during setup.
  
      Returns
      -------
      bool
          True if the model should remain active in the experiment, False otherwise.
      """
  
      active = True
  
      # Pred Interval Enforcement ----
      disable_pred_int = _disable_pred_int_enforcement(
          forecaster=forecaster, enforce_pi=experiment.enforce_pi
      )
  
      # Exogenous variable support Enforcement ----
      disable_exog_enforcement = _disable_exogenous_enforcement(
          forecaster=forecaster,
          enforce_exogenous=experiment.enforce_exogenous,
          exp_has_exogenous=experiment.exogenous_present,
      )
  
      if disable_pred_int or disable_exog_enforcement:
          active = False
  
      return active
  
file_path: pycaret/pycaret/utils/time_series/forecasting/models.py
imports: import pandas
  from sktime.forecasting.base import BaseForecaster
  from pycaret.utils.time_series import TSExogenousPresent
label_desc: Use image node_id 3 for calling a global function with example usage: _check_enforcements(forecaster, experiment) and returns: active