class_docstr: Test that the transform integrates well with QNodes.
docstr: Test that mid-circuit measurement statistics and terminal measurements
  can be made together.
docstr_tok: ["Test","that","mid-circuit","measurement","statistics","and","terminal","measurements","can","be","made","together","."]
code: def test_terminal_measurements(self, shots):
      """Test that mid-circuit measurement statistics and terminal measurements
      can be made together."""
      # Using DefaultQubit to allow non-commuting measurements
      dev = DefaultQubit(seed=10)
  
      @qml.qnode(dev)
      def circ1(x, y):
          qml.RX(x, 0)
          m0 = qml.measure(0)
          qml.RY(y, 1)
          return qml.expval(qml.PauliX(1)), qml.probs(op=m0)
  
      dev = DefaultQubit(seed=10)
  
      @qml.qnode(dev)
      def circ2(x, y):
          qml.RX(x, 0)
          qml.RY(y, 1)
          return qml.expval(qml.PauliX(1)), qml.probs(wires=[0])
  
      params = [1.5, 2.5]
      if isinstance(shots, list):
          for out1, out2 in zip(
              circ1(*params, shots=shots), circ2(*params, shots=shots)
          ):
              for o1, o2 in zip(out1, out2):
                  assert np.allclose(o1, o2)
      else:
          assert all(
              np.allclose(out1, out2)
              for out1, out2 in zip(
                  circ1(*params, shots=shots),
                  circ2(*params, shots=shots),
              )
          )
  
imports: import math
  import pytest
  import pennylane
  from pennylane.measurements import MidMeasureMP, MeasurementValue
  import pennylane.numpy
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 10 for calling the TestQNode obj's underlying member method code with example usage: obj.test_terminal_measurements(shots) and returns: qml,  qml, qml,  qml