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 updates the diff method
docstr_tok: ["Test","that","temporarily","setting","the","shots","updates","the","diff","method"]
code: def test_update_diff_method(self, interface, mocker):
      """Test that temporarily setting the shots updates the diff method"""
      a, b = jax.numpy.array([0.543, -0.654])
  
      spy = mocker.spy(qml, "execute")
  
      @qnode(DefaultQubit(), interface=interface)
      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))
  
      cost_fn(a, b, shots=100)
      # since we are using finite shots, parameter-shift will
      # be chosen
      assert (
          cost_fn.gradient_fn == "backprop"
      )  # gets restored to default
      assert (
          spy.call_args[1]["gradient_fn"] is qml.gradients.param_shift
      )
  
      # if we use the default shots value of None, backprop can now be used
      cost_fn(a, b)
      assert spy.call_args[1]["gradient_fn"] == "backprop"
  
imports: from itertools import product
  import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 4 for calling the TestShotsIntegration obj's underlying member method code with example usage: obj.test_update_diff_method(interface, mocker) and returns: qml