class_docstr: Test that the QNode correctly changes shot value, and
  remains differentiable.
class_docstr_tok: ["Test","that","the","QNode","correctly","changes","shot","value",",","and","remains","differentiable","."]
docstr: Test that temporarily setting the shots works
  for gradient computations
docstr_tok: ["Test","that","temporarily","setting","the","shots","works","for","gradient","computations"]
code: def test_gradient_integration(self):
      """Test that temporarily setting the shots works
      for gradient computations"""
      dev = DefaultQubit()
      a, b = np.array([0.543, -0.654], requires_grad=True)
  
      @qnode(dev, diff_method=qml.gradients.param_shift)
      def cost_fn(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliY(1))
  
      # TODO: fix the shot vectors issue
      res = qml.jacobian(cost_fn)(a, b, shots=[10000, 10000, 10000])
      assert dev.shots is None
      assert isinstance(res, tuple) and len(res) == 2
      assert all(r.shape == (3,) for r in res)
  
      expected = [np.sin(a) * np.sin(b), -np.cos(a) * np.cos(b)]
      assert all(
          np.allclose(np.mean(r, axis=0), e, atol=0.1, rtol=0)
          for r, e in zip(res, expected)
      )
  
imports: import autograd
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 2 for calling the TestShotsIntegration obj's underlying member method code with example usage: obj.test_gradient_integration() and returns: qml