code: def _extract(self, X, y, n, is_x=True, is_train=True):
      if self.cache is not None and (n, is_x, is_train) in self.cache:
          return self.cache[n, is_x, is_train]
  
      inds = self.splits[n][0] if is_train else self.splits[n][1]
      result = _safe_indexing(X if is_x else y, inds)
  
      if self.cache is not None:
          self.cache[n, is_x, is_train] = result
      return result
  
imports: from __future__ import absolute_import, division, print_function
  import warnings
  from collections import defaultdict
  from threading import Lock
  from timeit import default_timer
  import numpy
  import packaging.version
  from dask.base import normalize_token
  from scipy import sparse
  from scipy.stats import rankdata
  from sklearn.exceptions import FitFailedWarning
  from sklearn.pipeline import FeatureUnion, Pipeline
  from sklearn.utils.validation import check_consistent_length
  from toolz import pluck
  from .._compat import Mapping
  from .utils import _index_param_value, _num_samples, _safe_indexing, copy_estimator
label_desc: Use image node_id 6 for calling the CVCache obj's underlying member method code with example usage: obj._extract(X, y, n, is_x, is_train) and returns: result, self