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"""
      n_sample = 10
  
      dev = DefaultQubit()
  
      @qnode(dev, diff_method=None)
      def circuit():
          qml.RX(0.54, wires=0)
  
          return qml.sample(qml.PauliZ(0))
  
      result = circuit(shots=n_sample)
  
      assert isinstance(result, np.ndarray)
      assert np.array_equal(result.shape, (n_sample,))
  
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 4 for calling the TestSample obj's underlying member method code with example usage: obj.test_single_wire_sample() and returns: qml