code: def _cupy_coo_matmul_gradsp():
      return cuda.elementwise(
          "int32 nb, int32 _m, int32 _n, int32 _k, int32 nnz, \
           raw A _A, raw B _B, \
           raw T C_row, raw T C_col",
          "raw C C_data",
          """
          int i_nz = (i % nnz);
          int i_b = (i / nnz);
          if (i_b >= nb) {
              continue;
          }
          int i_C = i;
          int i_m = C_row[i_C];
          if (i_m < 0) {
              continue;
          }
          assert(i_m < _m);
          int i_n = C_col[i_C];
          if (i_n < 0) {
              continue;
          }
          assert(i_n < _n);
          C val_C = 0.0;
          for (int i_k = 0; i_k < _k; i_k++) {
              int i_A = i_k + _k * (i_m + _m * i_b);
              int i_B = i_n + _n * (i_k + _k * i_b);
              A val_A = _A[i_A];
              B val_B = _B[i_B];
              val_C += static_cast<C>(val_A * val_B);
          }
          C_data[i_C] = val_C;
          """,
          "coo_matmul_gradsp",
      )
  
imports: import numpy
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function_node
  from chainer import utils
  from chainer.utils import type_check
label_desc: Use image node_id 8 for calling a global function with example usage: _cupy_coo_matmul_gradsp() and returns: cuda