code: def backward_gpu(self, inputs, grad_outputs):
      if not chainer.should_use_cudnn(">=auto", 5000):
          return self._backward(inputs, grad_outputs)
      x, grid = inputs
      (gy,) = grad_outputs
  
      grid_t = cuda.cupy.transpose(grid, (0, 2, 3, 1))
      grid_t = cuda.cupy.ascontiguousarray(grid_t)
      x = cuda.cupy.ascontiguousarray(x)
      gy = cuda.cupy.ascontiguousarray(gy)
      gx = cuda.cupy.empty_like(x)
      ggrid_t = cuda.cupy.empty_like(grid_t)
  
      handle = cudnn.get_handle()
      x_desc = cudnn.create_tensor_descriptor(x)
      dx_desc = cudnn.create_tensor_descriptor(gx)
      dy_desc = cudnn.create_tensor_descriptor(gy)
  
      dtype = (
          numpy.float64 if x.dtype == numpy.float64 else numpy.float32
      )
      one = numpy.array(1, dtype=dtype).ctypes
      zero = numpy.array(0, dtype=dtype).ctypes
      libcudnn.spatialTfSamplerBackward(
          handle,
          self.st_desc.value,
          one.data,
          x_desc.value,
          x.data.ptr,
          zero.data,
          dx_desc.value,
          gx.data.ptr,
          one.data,
          dy_desc.value,
          gy.data.ptr,
          grid_t.data.ptr,
          zero.data,
          ggrid_t.data.ptr,
      )
      ggrid = cuda.cupy.transpose(ggrid_t, axes=(0, 3, 1, 2))
      return gx, ggrid
  
file_path: chainer/chainer/functions/array/spatial_transformer_sampler.py
imports: import numpy
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import function
  from chainer.utils import argument
  from chainer.utils import type_check
label_desc: Use image node_id 6 for calling the SpatialTransformerSampler obj's underlying member method code with example usage: obj.backward_gpu(inputs, grad_outputs) and returns: gx,  ggrid, self