code: def predict_proba(estimator, X):
      # type: (Any, Any) -> Optional[np.ndarray]
      
      if is_probabilistic_classifier(estimator):
          try:
              proba, = estimator.predict_proba(X)
              return proba
          except NotImplementedError:
              return None
      else:
          return None
docs: Return result of predict_proba, if an estimator supports it, or None.