class_docstr: Callable for multimetric scoring used to avoid repeated calls
  to `predict_proba`, `predict`, and `decision_function`.
  
  `_MultimetricScorer` will return a dictionary of scores corresponding to
  the scorers in the dictionary. Note that `_MultimetricScorer` can be
  created with a dictionary with one key  (i.e. only one actual scorer).
  
  Parameters
  ----------
  scorers : dict
      Dictionary mapping names to callable scorers.
  
  raise_exc : bool, default=True
      Whether to raise the exception in `__call__` or not. If set to `False`
      a formatted string of the exception details is passed as result of
      the failing scorer.
docstr: Return True if using a cache is beneficial.
  
  Caching may be beneficial when one of these conditions holds:
    - `_ProbaScorer` will be called twice.
    - `_PredictScorer` will be called twice.
    - `_ThresholdScorer` will be called twice.
    - `_ThresholdScorer` and `_PredictScorer` are called and
       estimator is a regressor.
    - `_ThresholdScorer` and `_ProbaScorer` are called and
       estimator does not have a `decision_function` attribute.
docstr_tok: ["Return","True","if","using","a","cache","is","beneficial",".","Caching","may","be","beneficial","when","one","of","these","conditions","holds",":","-","`","_ProbaScorer","`","will","be","called","twice",".","-","`","_PredictScorer","`","will","be","called","twice",".","-","`","_ThresholdScorer","`","will","be","called","twice",".","-","`","_ThresholdScorer","`","and","`","_PredictScorer","`","are","called","and","estimator","is","a","regressor",".","-","`","_ThresholdScorer","`","and","`","_ProbaScorer","`","are","called","and","estimator","does","not","have","a","`","decision_function","`","attribute","."]
code: def _use_cache(self, estimator):
      """Return True if using a cache is beneficial.
  
      Caching may be beneficial when one of these conditions holds:
        - `_ProbaScorer` will be called twice.
        - `_PredictScorer` will be called twice.
        - `_ThresholdScorer` will be called twice.
        - `_ThresholdScorer` and `_PredictScorer` are called and
           estimator is a regressor.
        - `_ThresholdScorer` and `_ProbaScorer` are called and
           estimator does not have a `decision_function` attribute.
  
      """
      if len(self._scorers) == 1:  # Only one scorer
          return False
  
      counter = Counter([type(v) for v in self._scorers.values()])
  
      if any(
          counter[known_type] > 1
          for known_type in [
              _PredictScorer,
              _ProbaScorer,
              _ThresholdScorer,
          ]
      ):
          return True
  
      if counter[_ThresholdScorer]:
          if is_regressor(estimator) and counter[_PredictScorer]:
              return True
          elif counter[_ProbaScorer] and not hasattr(
              estimator, "decision_function"
          ):
              return True
      return False
  
imports: import copy
  import warnings
  from collections import Counter
  from functools import partial
  from inspect import signature
  from traceback import format_exc
  import numpy
  from ..base import is_regressor
  from ..utils import Bunch
  from ..utils._param_validation import HasMethods, StrOptions, validate_params
  from ..utils._response import _get_response_values
  from ..utils.metadata_routing import MetadataRequest, MetadataRouter, _MetadataRequester, _routing_enabled, get_routing_for_object, process_routing
  from ..utils.multiclass import type_of_target
  from .None import accuracy_score, average_precision_score, balanced_accuracy_score, brier_score_loss, class_likelihood_ratios, explained_variance_score, f1_score, jaccard_score, log_loss, matthews_corrcoef, max_error, mean_absolute_error, mean_absolute_percentage_error, mean_gamma_deviance, mean_poisson_deviance, mean_squared_error, mean_squared_log_error, median_absolute_error, precision_score, r2_score, recall_score, roc_auc_score, top_k_accuracy_score
  from .cluster import adjusted_mutual_info_score, adjusted_rand_score, completeness_score, fowlkes_mallows_score, homogeneity_score, mutual_info_score, normalized_mutual_info_score, rand_score, v_measure_score
label_desc: Use image node_id 3 for calling the _MultimetricScorer obj's underlying member method code with example usage: obj._use_cache(estimator) and returns: False, False, True, True, True