class_docstr: Tests for the sample function
class_docstr_tok: ["Tests","for","the","sample","function"]
docstr: Test that the shape is correct with the shot vector too.
docstr_tok: ["Test","that","the","shape","is","correct","with","the","shot","vector","too","."]
code: def test_shape_shot_vector(self, obs):
      """Test that the shape is correct with the shot vector too."""
      shot_vector = (1, 2, 3)
      dev = qml.device("default.qubit", wires=3, shots=shot_vector)
      res = qml.sample(obs) if obs is not None else qml.sample()
      expected = (
          ((), (2,), (3,))
          if obs is not None
          else ((3,), (2, 3), (3, 3))
      )
      assert res.shape(dev, Shots(shot_vector)) == expected
  
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 21 for calling the TestSample obj's underlying member method code with example usage: obj.test_shape_shot_vector(obs) without return types