code: def _index_param_value(num_samples, v, indices):
      """Private helper function for parameter value indexing.
  
      This determines whether a fit parameter `v` to a SearchCV.fit
      should be indexed along with `X` and `y`. Note that this differs
      from the scikit-learn version. They pass `X` and compute num_samples.
      We pass `num_samples` instead.
      """
      if not _is_arraylike(v) or _num_samples(v) != num_samples:
          # pass through: skip indexing
          return v
      if sp.issparse(v):
          v = v.tocsr()
      return _safe_indexing(v, indices)
  
imports: import copy
  import warnings
  from itertools import compress
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import packaging.version
  import scipy.sparse
  from dask.base import tokenize
  from dask.delayed import Delayed, delayed
  from sklearn.utils.validation import _is_arraylike, indexable
  from ..utils import _num_samples
label_desc: Use image node_id 4 for calling a global function with example usage: _index_param_value(num_samples, v, indices) and returns: _safe_indexing, v