class_docstr: Tests for the sample integration
class_docstr_tok: ["Tests","for","the","sample","integration"]
docstr: Test the return type and shape of sampling a single wire
docstr_tok: ["Test","the","return","type","and","shape","of","sampling","a","single","wire"]
code: def test_single_wire_sample(self):
      """Test the return type and shape of sampling a single wire"""
  
      @qnode(
          DefaultQubit(),
          diff_method="parameter-shift",
          interface="torch",
      )
      def circuit():
          qml.RX(0.54, wires=0)
          return qml.sample(qml.PauliZ(0))
  
      result = circuit(shots=10)
  
      assert isinstance(result, torch.Tensor)
      assert np.array_equal(result.shape, (10,))
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 5 for calling the TestSample obj's underlying member method code with example usage: obj.test_single_wire_sample() and returns: qml