code: def _CompareBackpropInput(
      self, input_sizes, filter_sizes, output_sizes, stride, padding
  ):
      x1 = np.random.rand(*filter_sizes).astype(np.float32)
      x2 = np.random.rand(*output_sizes).astype(np.float32)
  
      def _GetVal(use_xla):
          with self.session():
              t0 = constant_op.constant(
                  input_sizes, shape=[len(input_sizes)]
              )
              t1 = array_ops.placeholder(np.float32, shape=filter_sizes)
              t2 = array_ops.placeholder(np.float32, shape=output_sizes)
              if use_xla:
                  with self.test_scope():
                      backprop = (
                          nn_ops.depthwise_conv2d_native_backprop_input(
                              t0,
                              t1,
                              t2,
                              strides=[1, stride, stride, 1],
                              padding=padding,
                          )
                      )
              else:
                  backprop = (
                      nn_ops.depthwise_conv2d_native_backprop_input(
                          t0,
                          t1,
                          t2,
                          strides=[1, stride, stride, 1],
                          padding=padding,
                      )
                  )
  
              ret = backprop.eval({t1: x1, t2: x2})
              self.assertShapeEqual(ret, backprop)
              return ret
  
      gpu_value = _GetVal(use_xla=True)
      cpu_value = _GetVal(use_xla=False)
      self.assertAllClose(cpu_value, gpu_value, rtol=1e-3, atol=1e-3)
  
imports: import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import nn_impl
  from tensorflow.python.ops import nn_ops
  import tensorflow.python.ops.nn_grad
  from tensorflow.python.platform import test
label_desc: Use image node_id 9 for calling the DepthwiseConv2DTest obj's underlying member method code with example usage: obj._CompareBackpropInput(input_sizes, filter_sizes, output_sizes, stride, padding) and returns: ret