code: def predict_uncertainty(self, X):
      if self.uncertainty_model is None:
          print(
              "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
          )
          print("This model was not trained to predict uncertainties")
          print(
              "Please follow the documentation to tell this model at training time to learn how to predict uncertainties"
          )
          print(
              "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
          )
          raise ValueError(
              "This model was not trained to predict uncertainties"
          )
  
      base_predictions = self.predict(X)
  
      if isinstance(base_predictions, Iterable):
          base_predictions_col = [[val] for val in base_predictions]
          base_predictions_col = np.array(base_predictions_col)
      else:
          base_predictions_col = [base_predictions]
  
      X_combined = scipy.sparse.hstack(
          [X, base_predictions_col], format="csr"
      )
  
      uncertainty_predictions = self.uncertainty_model.predict_proba(
          X_combined
      )
  
      results = {
          "base_prediction": base_predictions,
          "uncertainty_prediction": uncertainty_predictions,
      }
  
      if isinstance(base_predictions, Iterable):
          results["uncertainty_prediction"] = [
              row[1] for row in results["uncertainty_prediction"]
          ]
  
          results = pd.DataFrame.from_dict(results, orient="columns")
  
          if self.uc_results is not None:
              calibration_results = {}
              # grab the relevant properties from our uc_results, and make them each their own list in calibration_results
              for key, value in self.uc_results[1].items():
                  calibration_results[key] = []
  
              for proba in results["uncertainty_prediction"]:
                  max_bucket_proba = 0
                  bucket_num = 1
                  while proba > max_bucket_proba:
                      calibration_result = self.uc_results[bucket_num]
                      max_bucket_proba = self.uc_results[bucket_num][
                          "max_proba"
                      ]
                      bucket_num += 1
  
                  for key, value in calibration_result.items():
                      calibration_results[key].append(value)
              # TODO: grab the uncertainty_calibration data for DataFrames
              df_calibration_results = pd.DataFrame.from_dict(
                  calibration_results, orient="columns"
              )
              del df_calibration_results["max_proba"]
  
              results = pd.concat(
                  [results, df_calibration_results], axis=1
              )
  
      else:
          if self.uc_results is not None:
              # TODO: grab the uncertainty_calibration data for dictionaries
              for bucket_name, bucket_result in self.uc_results.items():
                  if proba > bucket_result["max_proba"]:
                      break
                  results.update(bucket_result)
                  del results["max_proba"]
  
      return results
  
imports: from collections import Iterable
  from copy import deepcopy
  import datetime
  import gc
  import os
  import random
  import warnings
  import numpy
  import pandas
  import scipy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.model_selection import train_test_split
  from sklearn import __version__
  from auto_ml import utils_models
  from auto_ml.utils_models import get_name_from_model
label_desc: Use image node_id 12 for calling the FinalModelATC obj's underlying member method code with example usage: obj.predict_uncertainty(X) and returns: results