class_docstr: Test that the transform integrates well with QNodes.
docstr: Test that new wires are not added if a measured wire is not reused.
docstr_tok: ["Test","that","new","wires","are","not","added","if","a","measured","wire","is","not","reused","."]
code: def test_no_new_wires_without_reuse(self, mocker):
      """Test that new wires are not added if a measured wire is not reused."""
      dev = qml.device("default.qubit", wires=3)
  
      # Quantum teleportation
      @qml.qnode(dev)
      def qnode1(phi):
          qml.RX(phi, 0)
          qml.Hadamard(1)
          qml.CNOT([1, 2])
          qml.CNOT([0, 1])
          qml.Hadamard(0)
  
          m0 = qml.measure(0)
          qml.cond(m0, qml.PauliZ)(2)
          m1 = qml.measure(1)
          qml.cond(m1, qml.PauliX)(2)
          return qml.expval(qml.PauliZ(2))
  
      # Prepare wire 0 in arbitrary state
      @qml.qnode(dev)
      def qnode2(phi):
          qml.RX(phi, 0)
          return qml.expval(qml.PauliZ(0))
  
      spy = mocker.spy(qml.defer_measurements, "_transform")
  
      # Outputs should match
      assert np.isclose(qnode1(np.pi / 4), qnode2(np.pi / 4))
      assert spy.call_count == 2  # once per device preprocessing
  
      deferred_tapes, _ = qml.defer_measurements(qnode1.qtape)
      deferred_tape = deferred_tapes[0]
      assert isinstance(deferred_tape.operations[5], qml.ops.Controlled)
      assert qml.equal(deferred_tape.operations[5].base, qml.PauliZ(2))
      assert deferred_tape.operations[5].hyperparameters[
          "control_wires"
      ] == qml.wires.Wires(0)
  
      assert qml.equal(deferred_tape.operations[6], qml.CNOT([1, 2]))
  
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 4 for calling the TestQNode obj's underlying member method code with example usage: obj.test_no_new_wires_without_reuse(mocker) and returns: qml, qml