code: def _cached_call(cache, estimator, method, *args, **kwargs):
      """Call estimator with method and args and kwargs.
      This code is private in scikit-learn 0.24, so it is copied here.
      """
      if cache is None:
          return getattr(estimator, method)(*args, **kwargs)
  
      try:
          return cache[method]
      except KeyError:
          result = getattr(estimator, method)(*args, **kwargs)
          cache[method] = result
          return result
  
file_path: greykite/greykite/sklearn/sklearn_scorer.py
imports: import warnings
  from functools import partial
  import numpy
  from greykite.common.constants import PREDICTED_COL
label_desc: Use image node_id 1 for calling a global function with example usage: _cached_call(cache, estimator, method) and returns: getattr, cache, result