class_docstr: Test the transform function (validate and dispatch).
docstr: Test qnode with a transform program and expand transform.
code: def test_qnode_with_expand_transform(self):
      """Test qnode with a transform program and expand transform."""
  
      dispatched_transform = transform(
          first_valid_transform, expand_transform=expand_transform
      )
  
      # Applied on a tape
      tapes, fn = dispatched_transform(tape_circuit, 0)
  
      assert isinstance(tapes, Sequence)
      assert callable(fn)
  
      @qml.qnode(device=dev)
      def qnode_circuit(a):
          """QNode circuit."""
          qml.Hadamard(wires=0)
          qml.CNOT(wires=[0, 1])
          qml.PauliX(wires=0)
          qml.RZ(a, wires=1)
          return qml.expval(qml.PauliZ(wires=0))
  
      # Applied on a qfunc (return a qfunc)
      qnode_transformed = dispatched_transform(qnode_circuit, 0)
  
      assert isinstance(
          qnode_transformed.transform_program,
          qml.transforms.core.TransformProgram,
      )
      expand_transform_container = (
          qnode_transformed.transform_program.pop_front()
      )
      assert isinstance(
          expand_transform_container,
          qml.transforms.core.TransformContainer,
      )
      assert expand_transform_container.args == [0]
      assert expand_transform_container.kwargs == {}
      assert expand_transform_container.classical_cotransform is None
      assert not expand_transform_container.is_informative
  
      transform_container = (
          qnode_transformed.transform_program.pop_front()
      )
  
      assert isinstance(
          transform_container, qml.transforms.core.TransformContainer
      )
      assert transform_container.args == [0]
      assert transform_container.kwargs == {}
      assert transform_container.classical_cotransform is None
      assert not expand_transform_container.is_informative
  
imports: from typing import Sequence, Callable
  from functools import partial
  import pytest
  import pennylane
  from pennylane.transforms.core import transform, TransformError, TransformContainer
label_desc: Use image node_id 7 for calling the TestTransformDispatcher obj's underlying member method code with example usage: obj.test_qnode_with_expand_transform() and returns: qml