code: def is_probabilistic_classifier(clf):
      # type: (Any) -> bool
      """Return True if a classifier can return probabilities"""
      if not hasattr(clf, "predict_proba"):
          return False
      if isinstance(clf, OneVsRestClassifier):
          # It currently has a predict_proba method, but does not check if
          # wrapped estimator has a predict_proba method.
          return hasattr(clf.estimator, "predict_proba")
      return True
  
imports: from __future__ import absolute_import
  from distutils.version import LooseVersion
  from typing import Any, Optional, List, Tuple
  import numpy
  import scipy.sparse
  from sklearn.multiclass import OneVsRestClassifier
  from eli5.sklearn.unhashing import invert_hashing_and_fit, handle_hashing_vec
  from eli5._feature_names import FeatureNames
label_desc: Use image node_id 3 for calling a global function with example usage: is_probabilistic_classifier(clf) and returns: True, False, hasattr