class_docstr: Test the transform program class and its method.
docstr: Test to insert a transform (dispatcher) at the beginning of a transform program.
docstr_tok: ["Test","to","insert","a","transform","(","dispatcher",")","at","the","beginning","of","a","transform","program","."]
code: def test_insert_transform(self):
      """Test to insert a transform (dispatcher) at the beginning of a transform program."""
      transform_program = TransformProgram()
  
      transform1 = transform(first_valid_transform)
      transform_program.insert_front_transform(transform1)
  
      assert not transform_program.is_empty()
      assert len(transform_program) == 1
      assert isinstance(transform_program[0], TransformContainer)
      assert transform_program[0].transform is first_valid_transform
  
      transform2 = transform(second_valid_transform)
      transform_program.insert_front_transform(transform2)
  
      assert not transform_program.is_empty()
      assert len(transform_program) == 2
      assert isinstance(transform_program[0], TransformContainer)
      assert transform_program[0].transform is second_valid_transform
      assert isinstance(transform_program[1], TransformContainer)
      assert transform_program[1].transform is first_valid_transform
  
      transform3 = transform(
          second_valid_transform, is_informative=True
      )
  
      with pytest.raises(
          TransformError,
          match="Informative transforms can only be added at the end of the program.",
      ):
          transform_program.insert_front_transform(transform3)
  
imports: from typing import Sequence, Callable
  import pytest
  import pennylane
  from pennylane.tape import QuantumScript
  from pennylane.transforms.core import transform, TransformProgram, TransformError, TransformContainer
  from pennylane.transforms.core.transform_program import _batch_postprocessing, _apply_postprocessing_stack, null_postprocessing
  from pennylane.typing import ResultBatch, Result
label_desc: Use image node_id 7 for calling the TestTransformProgram obj's underlying member method code with example usage: obj.test_insert_transform() without return types