code: def _non_zero_cmp(mat, am, zero, m):
      size = np.prod(mat.shape)
      if size == mat.nnz:
          return am
      else:
          ind = mat.row * mat.shape[1] + mat.col
          zero_ind = _find_missing_index(ind, size)
          return cupy.where(
              m == zero, cupy.minimum(zero_ind, am), zero_ind
          )
  
imports: import cupy
  import numpy
  from cupy._core import internal
  from cupy import _util
  from cupyx.scipy.sparse import _base
  from cupyx.scipy.sparse import _coo
  from cupyx.scipy.sparse import _sputils
label_desc: Use image node_id 2 for calling a global function with example usage: _non_zero_cmp(mat, am, zero, m) and returns: am, cupy