code: def gemm(self, x, y, out=None, trans1=False, trans2=False):
      if isinstance(x, numpy.ndarray) or isinstance(y, numpy.ndarray):
          raise ValueError(
              "Encountered a numpy array when processing with cupy. "
              "Did you call model.ops.asarray on your data?"
          )
      if trans1:
          x = x.T
      if trans2:
          y = y.T
      if out is None:
          return self.xp.dot(x, y)
      else:
          self.xp.dot(x, y, out=out)
          return out
  
imports: import numpy
  from ..None import registry
  from ..compat import cupy, cupyx
  from ..types import DeviceTypes
  from ..util import is_cupy_array, is_mxnet_gpu_array, is_tensorflow_gpu_array, is_torch_cuda_array, mxnet2xp, tensorflow2xp, torch2xp
  from .None import _custom_kernels
  from .numpy_ops import NumpyOps
  from .ops import Ops
label_desc: Use image node_id 8 for calling the CupyOps obj's underlying member method code with example usage: obj.gemm(x, y, out, trans1, trans2) and returns: self, out