code: def check_backward(self, theta, output_shape, grads):
      def f(theta):
          return functions.spatial_transformer_grid(theta, output_shape)
  
      with chainer.using_config("use_cudnn", self.use_cudnn):
          gradient_check.check_backward(
              f,
              (theta,),
              (grads,),
              dtype=numpy.float64,
              **self.check_backward_options,
          )
  
file_path: chainer/tests/chainer_tests/functions_tests/array_tests/test_spatial_transformer_grid.py
imports: import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 5 for calling the TestSpatialTransformerGrid obj's underlying member method code with example usage: obj.check_backward(theta, output_shape, grads) and returns: functions