class_docstr: Tests for the probs function
class_docstr_tok: ["Tests","for","the","probs","function"]
docstr: Test that probs for mid-circuit measurement values
  are correct for a single measurement value.
docstr_tok: ["Test","that","probs","for","mid-circuit","measurement","values","are","correct","for","a","single","measurement","value","."]
code: def test_observable_is_measurement_value(
      self, shots, phi, mocker, tol, tol_stochastic, device_name
  ):  # pylint: disable=too-many-arguments
      """Test that probs for mid-circuit measurement values
      are correct for a single measurement value."""
      np.random.seed(42)
      dev = qml.device(device_name, wires=2, shots=shots)
  
      @qml.qnode(dev)
      def circuit(phi):
          qml.RX(phi, 0)
          m0 = qml.measure(0)
          return qml.probs(op=m0)
  
      new_dev = circuit.device
      spy = mocker.spy(qml.QubitDevice, "probability")
  
      res = circuit(phi)
  
      atol = tol if shots is None else tol_stochastic
      expected = np.array([np.cos(phi / 2) ** 2, np.sin(phi / 2) ** 2])
  
      if not isinstance(shots, list):
          assert np.allclose(np.array(res), expected, atol=atol, rtol=0)
      else:
          for r in res:  # pylint: disable=not-an-iterable
              assert np.allclose(r, expected, atol=atol, rtol=0)
  
      if device_name != "default.mixed":
          custom_measurement_process(new_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 8 for calling the TestProbs obj's underlying member method code with example usage: obj.test_observable_is_measurement_value(shots, phi, mocker, tol, tol_stochastic, device_name) and returns: qml