code: def predict_ml_with_uncertainty(fut_df, trained_model):
      """Returns predictions and prediction intervals on new data using
      the machine-learning (ml) model
      fitted via ``fit_ml_model`` and the uncertainty model fitted via
      ``greykite.algo.uncertainty.conditional.conf_interval.conf_interval``
  
      :param fut_df: `pd.DataFrame`
          Input data for prediction.
          Must have all columns specified by
          ``model_formula_str`` or ``pred_cols``
      :param trained_model: `dict`
          A trained model returned from ``fit_ml_model``
      :return: `dict`
          A dictionary with following keys
  
          - "fut_df": `pd.DataFrame`
              Input data with ``y_col`` set to the predicted values
          - "x_mat": `patsy.design_info.DesignMatrix`
              Design matrix of the predictive model
      """
      # Gets point predictions.
      fut_df = fut_df.reset_index(drop=True)
      y_col = trained_model["y_col"]
      pred_res = predict_ml(fut_df=fut_df, trained_model=trained_model)
  
      y_pred = pred_res["fut_df"][y_col]
      x_mat = pred_res["x_mat"]
  
      fut_df[y_col] = y_pred.tolist()
  
      # Applies uncertainty model.
      pred_df_with_uncertainty = predict_ci(
          fut_df, trained_model["uncertainty_model"], x_mat=x_mat
      )
  
      return {"fut_df": pred_df_with_uncertainty, "x_mat": x_mat}
  
imports: import random
  import re
  import traceback
  import warnings
  from typing import Dict
  from typing import List
  from typing import Optional
  import matplotlib
  import numpy
  import pandas
  import patsy
  import scipy
  import statsmodels.api
  from pandas.plotting import register_matplotlib_converters
  from sklearn.ensemble import GradientBoostingRegressor
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.linear_model import ElasticNetCV
  from sklearn.linear_model import LarsCV
  from sklearn.linear_model import LassoCV
  from sklearn.linear_model import LassoLarsCV
  from sklearn.linear_model import RidgeCV
  from sklearn.linear_model import SGDRegressor
  from greykite.algo.common.l1_quantile_regression import QuantileRegression
  from greykite.algo.uncertainty.conditional.conf_interval import conf_interval
  from greykite.algo.uncertainty.conditional.conf_interval import predict_ci
  from greykite.common.constants import RESIDUAL_COL
  from greykite.common.constants import R2_null_model_score
  from greykite.common.evaluation import calc_pred_err
  from greykite.common.evaluation import r2_null_model_score
  from greykite.common.features.normalize import normalize_df
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import group_strs_with_regex_patterns
  from greykite.common.viz.timeseries_plotting import plot_multivariate
  import matplotlib.pyplot
label_desc: Use image node_id 7 for calling a global function with example usage: predict_ml_with_uncertainty(fut_df, trained_model) and returns: dict