class_docstr: Tests for the sample integration
class_docstr_tok: ["Tests","for","the","sample","integration"]
docstr: Test that sampling in backpropagation grad_on_execution raises an error
docstr_tok: ["Test","that","sampling","in","backpropagation","grad_on_execution","raises","an","error"]
code: def test_backprop_error(self):
      """Test that sampling in backpropagation grad_on_execution raises an error"""
      dev = DefaultQubit()
  
      @qnode(dev, diff_method="backprop")
      def circuit():
          qml.RX(0.54, wires=0)
          return qml.sample(qml.PauliZ(0)), qml.sample(qml.PauliX(1))
  
      with pytest.raises(
          qml.QuantumFunctionError,
          match="only supported when shots=None",
      ):
          circuit(shots=10)
  
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 1 for calling the TestSample obj's underlying member method code with example usage: obj.test_backprop_error() and returns: qml,  qml