docstr: Performs predictions and calculates uncertainty using
  one simulation of future and calculate the error separately
  (not relying on multiple simulations). Due to this the prediction
  intervals well into future will be narrower than ``predict_via_sim``
  and therefore less accurate. However there will be a major speed gain
  which might be important in some use cases.
  
  Parameters
  ----------
  fut_df : `pandas.DataFrame`
      The data frame which includes the timestamps for prediction
      and possibly regressors.
  trained_model : `dict`
      A fitted silverkite model which is the output of ``self.forecast``.
  past_df : `pandas.DataFrame` or None, default None
      A data frame with past values if autoregressive methods are called
      via ``autoreg_dict`` parameter of ``greykite.algo.forecast.silverkite.SilverkiteForecast.py``
  new_external_regressor_df: `pandas.DataFrame` or None, default None
      Contains the regressors not already included in ``fut_df``.
  
  Returns
  -------
  result: `dict`
      A dictionary with following items
  
      - "fut_df": `pandas.DataFrame`
          The same as input dataframe with an added column for the response.
          If value_col already appears in ``fut_df``, it will be over-written.
          If ``uncertainty_dict`` is provided as input,
          it will also contain a ``QUANTILE_SUMMARY_COL`` column.
          Here are the expected columns:
  
          (1) A time column with the column name being ``trained_model["time_col"]``
          (2) The predicted response in ``value_col`` column.
          (3) Quantile summary response in ``QUANTILE_SUMMARY_COL`` column.
              This column only appears if the model includes uncertainty.
          (4) Error std in `ERR_STD_COL` column.
              This column only appears if the model includes uncertainty.
  
      - "x_mat": `pandas.DataFrame`
          Design matrix of the predictive machine-learning model
      - "features_df": `pandas.DataFrame`
          The features dataframe used for prediction.
code: def predict_via_sim_fast(
      self,
      fut_df,
      trained_model,
      past_df=None,
      new_external_regressor_df=None,
  ):
      """Performs predictions and calculates uncertainty using
      one simulation of future and calculate the error separately
      (not relying on multiple simulations). Due to this the prediction
      intervals well into future will be narrower than ``predict_via_sim``
      and therefore less accurate. However there will be a major speed gain
      which might be important in some use cases.
  
      Parameters
      ----------
      fut_df : `pandas.DataFrame`
          The data frame which includes the timestamps for prediction
          and possibly regressors.
      trained_model : `dict`
          A fitted silverkite model which is the output of ``self.forecast``.
      past_df : `pandas.DataFrame` or None, default None
          A data frame with past values if autoregressive methods are called
          via ``autoreg_dict`` parameter of ``greykite.algo.forecast.silverkite.SilverkiteForecast.py``
      new_external_regressor_df: `pandas.DataFrame` or None, default None
          Contains the regressors not already included in ``fut_df``.
  
      Returns
      -------
      result: `dict`
          A dictionary with following items
  
          - "fut_df": `pandas.DataFrame`
              The same as input dataframe with an added column for the response.
              If value_col already appears in ``fut_df``, it will be over-written.
              If ``uncertainty_dict`` is provided as input,
              it will also contain a ``QUANTILE_SUMMARY_COL`` column.
              Here are the expected columns:
  
              (1) A time column with the column name being ``trained_model["time_col"]``
              (2) The predicted response in ``value_col`` column.
              (3) Quantile summary response in ``QUANTILE_SUMMARY_COL`` column.
                  This column only appears if the model includes uncertainty.
              (4) Error std in `ERR_STD_COL` column.
                  This column only appears if the model includes uncertainty.
  
          - "x_mat": `pandas.DataFrame`
              Design matrix of the predictive machine-learning model
          - "features_df": `pandas.DataFrame`
              The features dataframe used for prediction.
  
      """
      fut_df = fut_df.copy()
      time_col = trained_model["time_col"]
      value_col = trained_model["value_col"]
  
      # We only simulate one series without using any error during simulations
      sim_res = self.simulate(
          fut_df=fut_df,
          trained_model=trained_model,
          past_df=past_df,
          new_external_regressor_df=new_external_regressor_df,
          include_err=False,
      )
      x_mat = sim_res["x_mat"]
      features_df = sim_res["features_df"]
  
      if trained_model["uncertainty_dict"] is None:
          # predictions are stored to ``value_col``
          pred_res = predict_ml(
              fut_df=features_df, trained_model=trained_model
          )
          fut_df = pred_res["fut_df"]
          x_mat = pred_res["x_mat"]
      else:
          # predictions are stored to ``value_col``
          # quantiles are stored to ``QUANTILE_SUMMARY_COL``
          pred_res = predict_ml_with_uncertainty(
              fut_df=features_df, trained_model=trained_model
          )
          fut_df = pred_res["fut_df"]
          x_mat = pred_res["x_mat"]
  
      # Makes sure to return only necessary columns
      potential_forecast_cols = [
          time_col,
          value_col,
          QUANTILE_SUMMARY_COL,
          ERR_STD_COL,
      ]
      existing_forecast_cols = [
          col
          for col in potential_forecast_cols
          if col in fut_df.columns
      ]
      fut_df = fut_df[existing_forecast_cols]
  
      return {
          "fut_df": fut_df,
          "x_mat": x_mat,
          "features_df": features_df,
      }
  
imports: import re
  import warnings
  from typing import Type
  import numpy
  import pandas
  from pandas.plotting import register_matplotlib_converters
  from pandas.tseries.frequencies import to_offset
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_changepoints_dict
  from greykite.algo.changepoint.adalasso.changepoint_detector import get_seasonality_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import build_seasonality_feature_df_from_detection_result
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_seasonality_changepoint_df_cols
  from greykite.algo.common.ml_models import fit_ml_model_with_evaluation
  from greykite.algo.common.ml_models import predict_ml
  from greykite.algo.common.ml_models import predict_ml_with_uncertainty
  from greykite.algo.forecast.silverkite.constants.silverkite_constant import default_silverkite_constant
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonalityEnum
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonalityEnumMixin
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_fourier_feature_col_names
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_similar_lag
  from greykite.common.constants import CHANGEPOINT_COL_PREFIX
  from greykite.common.constants import ERR_STD_COL
  from greykite.common.constants import QUANTILE_SUMMARY_COL
  from greykite.common.constants import SEASONALITY_REGEX
  from greykite.common.constants import TimeFeaturesEnum
  from greykite.common.enums import TimeEnum
  from greykite.common.features.timeseries_features import add_daily_events
  from greykite.common.features.timeseries_features import add_time_features_df
  from greykite.common.features.timeseries_features import fourier_series_multi_fcn
  from greykite.common.features.timeseries_features import get_changepoint_dates_from_changepoints_dict
  from greykite.common.features.timeseries_features import get_changepoint_features
  from greykite.common.features.timeseries_features import get_changepoint_features_and_values_from_config
  from greykite.common.features.timeseries_features import get_default_origin_for_time_vars
  from greykite.common.features.timeseries_lags import build_autoreg_df
  from greykite.common.features.timeseries_lags import build_autoreg_df_multi
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import get_pattern_cols
  from greykite.common.python_utils import unique_elements_in_list
  from greykite.common.time_properties import describe_timeseries
  from greykite.common.time_properties import fill_missing_dates
  from greykite.common.time_properties import min_gap_in_seconds
  from greykite.common.time_properties_forecast import get_default_horizon_from_period
label_desc: Use image node_id 8 for calling the SilverkiteForecast obj's underlying member method code with example usage: obj.predict_via_sim_fast(fut_df, trained_model, past_df, new_external_regressor_df) and returns: dict