class_docstr: Test the stop_recording method of QueuingManager.
class_docstr_tok: ["Test","the","stop_recording","method","of","QueuingManager","."]
docstr: Test that stop_recording works when nested with other stop_recordings
docstr_tok: ["Test","that","stop_recording","works","when","nested","with","other","stop_recordings"]
code: def test_nested_stop_recording_on_function(self):
      """Test that stop_recording works when nested with other stop_recordings"""
  
      @QueuingManager.stop_recording()
      @QueuingManager.stop_recording()
      def my_op():
          return [
              qml.RX(0.123, wires=0),
              qml.RY(2.32, wires=0),
              qml.RZ(1.95, wires=0),
          ]
  
      # the stop_recording function will still work outside of any queuing contexts
      res = my_op()
      assert len(res) == 3
  
      dev = qml.device("default.qubit", wires=1)
  
      @qml.qnode(dev)
      def my_circuit():
          my_op()
  
          with QueuingManager.stop_recording():
              qml.PauliX(wires=0)
              my_op()
  
          qml.Hadamard(wires=0)
          my_op()
          return qml.state()
  
      my_circuit.construct([], {})
      tape = my_circuit.qtape
  
      assert len(tape.operations) == 1
      assert tape.operations[0].name == "Hadamard"
  
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 3 for calling the TestStopRecording obj's underlying member method code with example usage: obj.test_nested_stop_recording_on_function() and returns: list, qml