code: def _predict_binary(estimator, X):
      """Make predictions using a single binary estimator."""
      if is_regressor(estimator):
          return estimator.predict(X)
      try:
          score = np.ravel(estimator.decision_function(X))
      except (AttributeError, NotImplementedError):
          # probabilities of the positive class
          score = estimator.predict_proba(X)[:, 1]
      return score
  
imports: import array
  import itertools
  import warnings
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
  from .metrics.pairwise import pairwise_distances_argmin
  from .preprocessing import LabelBinarizer
  from .utils import check_random_state
  from .utils._param_validation import HasMethods, Interval
  from .utils._tags import _safe_tags
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, process_routing
  from .utils.metaestimators import _safe_split, available_if
  from .utils.multiclass import _check_partial_fit_first_call, _ovr_decision_function, check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_method_params, _num_samples, check_is_fitted
label_desc: Use image node_id 3 for calling a global function with example usage: _predict_binary(estimator, X) and returns: score, estimator