code: def make_tape(fn):
      """Returns a function that generates the tape from a quantum function without any
      operation queuing taking place.
  
      This is useful when you would like to manipulate or transform
      the tape created by a quantum function without evaluating it.
  
      Args:
          fn (function): the quantum function to generate the tape from
  
      Returns:
          function: The returned function takes the same arguments as the quantum
          function. When called, it returns the generated quantum tape
          without any queueing occuring.
  
      **Example**
  
      Consider the following quantum function:
  
      .. code-block:: python
  
          def qfunc(x):
              qml.Hadamard(wires=0)
              qml.CNOT(wires=[0, 1])
              qml.RX(x, wires=0)
  
      We can use ``make_tape`` to extract the tape generated by this
      quantum function, without any of the operations being queued by
      any existing queuing contexts:
  
      >>> with qml.tape.QuantumTape() as active_tape:
      ...     qml.RY(1.0, wires=0)
      ...     tape = make_tape(qfunc)(0.5)
      >>> tape.operations
      [Hadamard(wires=[0]), CNOT(wires=[0, 1]), RX(0.5, wires=[0])]
  
      Note that the currently recording tape did not queue any of these quantum operations:
  
      >>> active_tape.operations
      [RY(1.0, wires=[0])]
      """
  
      def wrapper(*args, **kwargs):
          with qml.QueuingManager.stop_recording(), qml.tape.QuantumTape() as new_tape:
              fn(*args, **kwargs)
  
          return new_tape
  
      return wrapper
  
file_path: pennylane/pennylane/transforms/qfunc_transforms.py
imports: from copy import deepcopy
  import functools
  import inspect
  import os
  import warnings
  import pennylane
  from pennylane.tape import make_qscript
label_desc: Use image node_id 1 for calling a global function with example usage: make_tape(fn) and returns: wrapper, new_tape