code: def _minor_reduce(X, min_or_max):
      fminmax = ufunc_dic[min_or_max]
  
      major_index = np.flatnonzero(np.diff(X.indptr))
      values = cpu_np.zeros(major_index.shape[0], dtype=X.dtype)
      ptrs = X.indptr[major_index]
  
      start = ptrs[0]
      for i, end in enumerate(ptrs[1:]):
          values[i] = fminmax(X.data[start:end])
          start = end
      values[-1] = fminmax(X.data[end:])
  
      return major_index, np.array(values)
  
file_path: cuml/python/cuml/_thirdparty/sklearn/utils/sparsefuncs.py
imports: from ....thirdparty_adapters.sparsefuncs_fast import csr_mean_variance_axis0, csc_mean_variance_axis0
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.safe_imports import cpu_only_import_from
label_desc: Use image node_id 10 for calling a global function with example usage: _minor_reduce(X, min_or_max) and returns: major_index,  np