class_docstr: Test that the QNode correctly changes shot value, and
  differentiates it.
class_docstr_tok: ["Test","that","the","QNode","correctly","changes","shot","value",",","and","differentiates","it","."]
docstr: Test that changing shots works on execution
docstr_tok: ["Test","that","changing","shots","works","on","execution"]
code: def test_changing_shots(self):
      """Test that changing shots works on execution"""
      dev = DefaultQubit()
      a, b = torch.tensor(
          [0.543, -0.654], requires_grad=True, dtype=torch.float64
      )
  
      @qnode(
          dev, interface="torch", diff_method=qml.gradients.param_shift
      )
      def circuit(a, b):
          qml.RY(a, wires=0)
          qml.RX(b, wires=1)
          qml.CNOT(wires=[0, 1])
          return qml.sample(wires=(0, 1))
  
      # execute with device default shots (None)
      with pytest.raises(qml.DeviceError):
          circuit(a, b)
  
      # execute with shots=100
      res = circuit(a, b, shots=100)
      assert res.shape == (100, 2)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 1 for calling the TestShotsIntegration obj's underlying member method code with example usage: obj.test_changing_shots() and returns: qml