code: def _minor_reduce(X, ufunc):
      major_index = np.flatnonzero(np.diff(X.indptr))
  
      # reduceat tries casts X.indptr to intp, which errors
      # if it is int64 on a 32 bit system.
      # Reinitializing prevents this where possible, see #13737
      X = type(X)((X.data, X.indices, X.indptr), shape=X.shape)
      value = ufunc.reduceat(X.data, X.indptr[major_index])
      return major_index, value
  
imports: import numpy
  import scipy.sparse
  from ..utils.validation import _check_sample_weight
  from .sparsefuncs_fast import csc_mean_variance_axis0
  from .sparsefuncs_fast import csr_mean_variance_axis0
  from .sparsefuncs_fast import incr_mean_variance_axis0
label_desc: Use image node_id 13 for calling a global function with example usage: _minor_reduce(X, ufunc) and returns: major_index,  value