code: def test_nested_tapes():
      """Test nested tapes inside the qnode."""
  
      @qml.qnode(qml.device("default.qubit", wires=1))
      def circ():
          with qml.queuing.AnnotatedQueue():
              qml.PauliX(0)
              with qml.queuing.AnnotatedQueue():
                  qml.PauliY(0)
          with qml.queuing.AnnotatedQueue():
              qml.PauliZ(0)
              with qml.queuing.AnnotatedQueue():
                  qml.PauliX(0)
          return qml.expval(qml.PauliZ(0))
  
      expected = (
          "0: ──Tape:0──Tape:1─┤  <Z>\n\n"
          "Tape:0\n0: ──X──Tape:2─┤  \n\n"
          "Tape:2\n0: ──Y─┤  \n\n"
          "Tape:1\n0: ──Z──Tape:3─┤  \n\n"
          "Tape:3\n0: ──X─┤  "
      )
  
      assert draw(circ)() == expected
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.drawer import draw
label_desc: Use image node_id 3 for calling a global function with example usage: test_nested_tapes() and returns: qml