code: def check_type_forward(self, in_types):
      type_check.expect(in_types.size() == 2)
      a_type, b_type = in_types
      # a_type.shape: ((nb,) _m, _k) when transa is False
      # b_type.shape: ((nb,) _k, _n) when transb is False
      a_m_axis, a_k_axis = -2, -1
      b_k_axis, b_n_axis = -2, -1
      sp_m_axis, sp_n_axis = -2, -1
      if self.transa:
          a_m_axis, a_k_axis = -1, -2
      if self.transb:
          b_k_axis, b_n_axis = -1, -2
      if self.transc:
          sp_m_axis, sp_n_axis = -1, -2
      type_check.expect(
          a_type.dtype.kind == "f",
          b_type.dtype.kind == "f",
          a_type.ndim >= 2,
          a_type.ndim <= 3,
          a_type.ndim == b_type.ndim,
          a_type.shape[a_m_axis] == self.sp_shape[sp_m_axis],
          b_type.shape[b_n_axis] == self.sp_shape[sp_n_axis],
          a_type.shape[a_k_axis] == b_type.shape[b_k_axis],
      )
      a_ndim = type_check.eval(a_type.ndim)
      if a_ndim == 3:
          type_check.expect(
              a_type.shape[0] == self.sp_row.shape[0],
              b_type.shape[0] == self.sp_row.shape[0],
          )
  
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 2 for calling the CooMatMulGradSP obj's underlying member method code with example usage: obj.check_type_forward(in_types) without return types