class_docstr: Tests for the sample function
class_docstr_tok: ["Tests","for","the","sample","function"]
docstr: Test that the shape is correct when wires are provided.
docstr_tok: ["Test","that","the","shape","is","correct","when","wires","are","provided","."]
code: def test_shape_wires(self, n_samples):
      """Test that the shape is correct when wires are provided."""
      dev = qml.device("default.qubit", wires=3, shots=n_samples)
      mp = qml.sample(wires=(0, 1))
      assert (
          mp.shape(dev, Shots(n_samples)) == (n_samples, 2)
          if n_samples != 1
          else (2,)
      )
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane.measurements import MeasurementShapeError, Sample, Shots
  from pennylane.operation import EigvalsUndefinedError, Operator
label_desc: Use image node_id 20 for calling the TestSample obj's underlying member method code with example usage: obj.test_shape_wires(n_samples) without return types