class_docstr: Test the stop_recording method of QueuingManager.
class_docstr_tok: ["Test","the","stop_recording","method","of","QueuingManager","."]
docstr: Test that stop_recording transform works when directly applied to an op
docstr_tok: ["Test","that","stop_recording","transform","works","when","directly","applied","to","an","op"]
code: def test_stop_recording_directly_on_op(self):
      """Test that stop_recording transform works when directly applied to an op"""
      dev = qml.device("default.qubit", wires=1)
      res = []
  
      @qml.qnode(dev)
      def my_circuit():
          op1 = QueuingManager.stop_recording()(qml.RX)(
              np.pi / 4.0, wires=0
          )
          op2 = qml.RY(np.pi / 4.0, wires=0)
          res.extend([op1, op2])
          return qml.expval(qml.PauliZ(0))
  
      my_circuit.construct([], {})
      tape = my_circuit.qtape
  
      assert len(tape.operations) == 1
      assert tape.operations[0] == res[1]
      assert len(res) == 2
  
imports: from multiprocessing.dummy import Pool
  import pytest
  import numpy
  import pennylane
  from pennylane.queuing import AnnotatedQueue, QueuingManager, QueuingError, WrappedObj
label_desc: Use image node_id 2 for calling the TestStopRecording obj's underlying member method code with example usage: obj.test_stop_recording_directly_on_op() and returns: qml