code: def backward(self, x, gy):
      (invx,) = self.get_retained_outputs()
      # Unpack 1-length tuples
      (gy,) = gy
      # Gradient is - x^-T (dx) x^-T
      ret = chainer.functions.matmul(-invx, gy, transa=True)
      ret2 = chainer.functions.matmul(ret, invx, transb=True)
      return (ret2,)
  
imports: import numpy.linalg
  import chainer
  from chainer.backends import cuda
  from chainer import function_node
  import chainer.functions
  from chainer.functions.math import matmul
  from chainer import utils
  from chainer.utils import precision
  from chainer.utils import type_check
label_desc: Use image node_id 4 for calling the BatchInv obj's underlying member method code with example usage: obj.backward(x, gy) and returns: ret2