code: def test_gradient_multiple(self, inputs, gc, dc):
      (x1, x2) = inputs
  
      def f(inputs, outputs):
          for idx in [0, 1]:
              self.assertEqual(type(inputs[idx].shape), tuple)
              outputs[idx].reshape(inputs[idx].shape)
              outputs[idx].data[...] = inputs[idx].data * 2
  
      def grad_f(inputs, outputs):
          # Ordering is [inputs, outputs, grad_outputs]
          self.assertEqual(len(inputs), 6)
          self.assertEqual(len(outputs), 2)
          for grad_output_idx, grad_input_idx in [(4, 0), (5, 1)]:
              grad_output = inputs[grad_output_idx]
              grad_input = outputs[grad_input_idx]
              grad_input.reshape(grad_output.shape)
              grad_input.data[...] = grad_output.data * 2
  
      op = CreatePythonOperator(
          f, ["x1", "x2"], ["y1", "y2"], grad_f=grad_f
      )
  
      for idx in [0, 1]:
          self.assertGradientChecks(gc, op, [x1, x2], idx, [0, 1])
      self.assertDeviceChecks(dc, op, [x1, x2], [0, 1])
  
imports: from caffe2.python import core, workspace
  from caffe2.python.core import CreatePythonOperator
  import caffe2.python.hypothesis_test_util
  from hypothesis import given, settings
  import hypothesis.strategies
  import numpy
label_desc: Use image node_id 12 for calling the PythonOpTest obj's underlying member method code with example usage: obj.test_gradient_multiple(inputs, gc, dc) without return types