code: def predict_proba(model, x_encoded, classes):
      """
      The predict_proba compute the proba values for each x_encoded row
      Parameters
      -------
      model: model object
          model used to check the different values of target estimate predict proba
      x_encoded: pandas.DataFrame
          Prediction set.
      classes: list
          List of labels if the model used is for classification problem, None otherwise.
      Returns
      -------
      pandas.DataFrame
              dataset of predicted proba for each label.
      """
      if hasattr(model, "predict_proba"):
          proba_values = pd.DataFrame(
              model.predict_proba(x_encoded),
              columns=["class_" + str(x) for x in classes],
              index=x_encoded.index,
          )
      else:
          raise ValueError("model has no predict_proba method")
  
      return proba_values
  
imports: from inspect import ismethod
  import pandas
label_desc: Use image node_id 2 for calling a global function with example usage: predict_proba(model, x_encoded, classes) and returns: proba_values