class_docstr: Converts a transform that has the signature ``(tape -> Sequence(tape), fn)`` to a transform dispatcher
  that can act on :class:`pennylane.tape.QuantumTape`, quantum function, :class:`pennylane.QNode`,
  :class:`pennylane.devices.Device`.
  
  .. warning::
  
      This class is developer-facing and should not be used directly. Instead, use
      :func:`qml.transform <pennylane.transform>` if you would like to make a custom
      transform.
  
  .. seealso:: :func:`~.pennylane.transform`
class_docstr_tok: ["Converts","a","transform","that","has","the","signature","``","(","tape","-",">","Sequence","(","tape",")",",","fn",")","``","to","a","transform","dispatcher","that","can","act","on",":","class",":","`","pennylane.tape.QuantumTape","`",",","quantum","function",",",":","class",":","`","pennylane.QNode","`",",",":","class",":","`","pennylane.devices.Device","`",".","..","warning",":",":","This","class","is","developer-facing","and","should","not","be","used","directly",".","Instead",",","use",":","func",":","`","qml.transform","<","pennylane.transform",">","`","if","you","would","like","to","make","a","custom","transform",".","..","seealso",":",":",":","func",":","`","~.pennylane.transform","`"]
docstr: Apply the transform on a quantum function.
docstr_tok: ["Apply","the","transform","on","a","quantum","function","."]
code: def _qfunc_transform(self, qfunc, targs, tkwargs):
      """Apply the transform on a quantum function."""
  
      def qfunc_transformed(*args, **kwargs):
          with qml.queuing.AnnotatedQueue() as q:
              qfunc_output = qfunc(*args, **kwargs)
  
          tape = qml.tape.QuantumScript.from_queue(q)
          with qml.QueuingManager.stop_recording():
              transformed_tapes, processing_fn = self._transform(
                  tape, *targs, **tkwargs
              )
  
          if len(transformed_tapes) != 1:
              raise TransformError(
                  "Impossible to dispatch your transform on quantum function, because more than "
                  "one tape is returned"
              )
  
          transformed_tape = transformed_tapes[0]
  
          if self.is_informative:
              return processing_fn(transformed_tapes)
  
          for op in transformed_tape.circuit:
              qml.apply(op)
  
          mps = transformed_tape.measurements
  
          if not mps:
              return qfunc_output
  
          if isinstance(
              qfunc_output, qml.measurements.MeasurementProcess
          ):
              return tuple(mps) if len(mps) > 1 else mps[0]
  
          if isinstance(qfunc_output, (tuple, list)):
              return type(qfunc_output)(mps)
  
          interface = qml.math.get_interface(qfunc_output)
          return qml.math.asarray(mps, like=interface)
  
      return qfunc_transformed
  
imports: import functools
  import os
  import copy
  import warnings
  import types
  import pennylane
label_desc: Use image node_id 12 for calling the TransformDispatcher obj's underlying member method code with example usage: obj._qfunc_transform(qfunc, targs, tkwargs) and returns: qfunc_transformed, qml, processing_fn, qfunc_output, unknown, type