code: def get_predict_function_and_model_type(model, model_class):
      prep_tf = get_tf_yhat(model)
      prep_h2o = get_h2o_yhat(model)
  
      # check for exceptions
      yhat_exception_dict = {
          "xgboost.core.Booster": (
              yhat_xgboost,
              None,
          ),  # there is no way of checking for regr/classif
          "tensorflow.python.keras.engine.sequential.Sequential": prep_tf,
          "tensorflow.python.keras.engine.training.Model": prep_tf,
          "tensorflow.python.keras.engine.functional.Functional": prep_tf,
          "keras.engine.sequential.Sequential": prep_tf,
          "keras.engine.training.Model": prep_tf,
          "keras.engine.functional.Functional": prep_tf,
          "h2o.estimators.coxph.H2OCoxProportionalHazardsEstimator": prep_h2o,
          "h2o.estimators.deeplearning.H2ODeepLearningEstimator": prep_h2o,
          "h2o.estimators.gam.H2OGeneralizedAdditiveEstimator": prep_h2o,
          "h2o.estimators.gbm.H2OGradientBoostingEstimator": prep_h2o,
          "h2o.estimators.glm.H2OGeneralizedLinearEstimator": prep_h2o,
          "h2o.estimators.naive_bayes.H2ONaiveBayesEstimator": prep_h2o,
          "h2o.estimators.psvm.H2OSupportVectorMachineEstimator": prep_h2o,
          "h2o.estimators.random_forest.H2ORandomForestEstimator": prep_h2o,
          "h2o.estimators.rulefit.H2ORuleFitEstimator": prep_h2o,
          "h2o.estimators.stackedensemble.H2OStackedEnsembleEstimator": prep_h2o,
          "h2o.estimators.targetencoder.H2OTargetEncoderEstimator": prep_h2o,
          "h2o.estimators.xgboost.H2OXGBoostEstimator": prep_h2o,
      }
  
      if yhat_exception_dict.get(model_class, None) is not None:
          return yhat_exception_dict.get(model_class)
  
      model_type_ = None
      # additional extraction sklearn
      if hasattr(model, "_estimator_type"):
          if model._estimator_type == "classifier":
              model_type_ = "classification"
          elif model._estimator_type == "regressor":
              model_type_ = "regression"
  
      # default extraction
      if hasattr(model, "predict_proba"):
          # check if model has predict_proba
          return (
              yhat_proba_default,
              "classification" if model_type_ is None else model_type_,
          )
      elif hasattr(model, "predict"):
          # check if model has predict
          return (
              yhat_default,
              "regression" if model_type_ is None else model_type_,
          )
      else:
          # this path results in an error later
          return False, None
  
file_path: DALEX/python/dalex/dalex/_explainer/yhat.py
imports: from warnings import warn
  import numpy
label_desc: Use image node_id 12 for calling a global function with example usage: get_predict_function_and_model_type(model, model_class) and returns: yhat_exception_dict, yhat_proba_default,  unknown, yhat_default,  unknown, False,  None