class_docstr: Tests for the probs function
class_docstr_tok: ["Tests","for","the","probs","function"]
docstr: Test that the correct probability is returned.
docstr_tok: ["Test","that","the","correct","probability","is","returned","."]
code: def test_full_prob(self, init_state, tol, mocker):
      """Test that the correct probability is returned."""
      dev = qml.device("default.qubit.legacy", wires=4)
      spy = mocker.spy(qml.QubitDevice, "probability")
  
      state = init_state(4)
  
      @qml.qnode(dev)
      def circuit():
          qml.StatePrep(state, wires=list(range(4)))
          return qml.probs(wires=range(4))
  
      res = circuit()
      expected = np.abs(state) ** 2
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
      custom_measurement_process(dev, spy)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ProbabilityMP, Shots
  from pennylane.devices.qubit.measure import flatten_state
label_desc: Use image node_id 5 for calling the TestProbs obj's underlying member method code with example usage: obj.test_full_prob(init_state, tol, mocker) and returns: qml