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","`"]
code: def __call__(
      self, *targs, **tkwargs
  ):  # pylint: disable=too-many-return-statements
      obj = None
  
      if targs:
          # assume the first argument passed to the transform
          # is the object we wish to transform
          obj, *targs = targs
  
      if isinstance(obj, qml.tape.QuantumScript):
          if self._expand_transform:
              (
                  expanded_tapes,
                  expand_processing,
              ) = self._expand_transform(obj, *targs, **tkwargs)
              transformed_tapes = []
              processing_and_sclices = []
              start = 0
              for tape in expanded_tapes:
                  (
                      intermediate_tapes,
                      post_processing_fn,
                  ) = self._transform(tape, *targs, **tkwargs)
                  transformed_tapes.extend(intermediate_tapes)
                  end = start + len(intermediate_tapes)
                  processing_and_sclices.append(
                      tuple([post_processing_fn, slice(start, end)])
                  )
                  start = end
  
              def processing_fn(results):
                  processed_results = [
                      fn(results[slice])
                      for fn, slice in processing_and_sclices
                  ]
                  return expand_processing(processed_results)
  
          else:
              transformed_tapes, processing_fn = self._transform(
                  obj, *targs, **tkwargs
              )
  
          if self.is_informative:
              return processing_fn(transformed_tapes)
          return transformed_tapes, processing_fn
  
      if isinstance(obj, qml.QNode):
          return self._qnode_transform(obj, targs, tkwargs)
      # TODO: Remove with the previous device generation
      if isinstance(obj, qml.Device):
          return self._old_device_transform(obj, targs, tkwargs)
      if isinstance(obj, qml.devices.Device):
          return self._device_transform(obj, targs, tkwargs)
      if callable(obj):
          return self._qfunc_transform(obj, targs, tkwargs)
  
      # Input is not a QNode nor a quantum tape nor a device.
      # Assume Python decorator syntax:
      #
      # result = some_transform(*transform_args)(qnode)(*qnode_args)
  
      raise TransformError(
          "Decorating a QNode with @transform_fn(**transform_kwargs) has been "
          "removed. Please decorate with @functools.partial(transform_fn, **transform_kwargs) "
          "instead, or call the transform directly using qnode = transform_fn(qnode, "
          "**transform_kwargs). Visit the deprecations page for more details: "
          "https://docs.pennylane.ai/en/stable/development/deprecations.html#completed-deprecation-cycles",
      )
  
imports: import functools
  import os
  import copy
  import warnings
  import types
  import pennylane
label_desc: Use image node_id 3 for calling the TransformDispatcher obj's underlying member method code with example usage: obj.__call__() and returns: transformed_tapes,  processing_fn, self, self, self, self, processing_fn, expand_processing