code: def predict_proba(self, X):
          
          #TODO: Check consistency of X
          n_samples, n_features = X.shape
          prob = np.zeros((n_samples, 2))
  
          if self.pruned:
              tree_ = self.tree_.tree_pruned
          else:
              tree_ = self.tree_.tree
  
          prob[:, 1] = self._classify(X, tree_, proba=True)
          prob[:, 0] = 1 - prob[:, 1]
  
          return prob
docs: Predict class probabilities of the input samples X.
  
          Parameters
          ----------
          X : array-like of shape = [n_samples, n_features]
              The input samples.
  
          Returns
          -------
          prob : array of shape = [n_samples, 2]
              The class probabilities of the input samples.