class_docstr: Test the transform program class and its method.
docstr: Test that it is only possible to create valid transforms.
docstr_tok: ["Test","that","it","is","only","possible","to","create","valid","transforms","."]
code: def test_valid_transforms(self):
      """Test that it is only possible to create valid transforms."""
      transform_program = TransformProgram()
      transform1 = TransformContainer(
          transform=first_valid_transform, is_informative=True
      )
      transform_program.push_back(transform1)
  
      with pytest.raises(
          TransformError,
          match="The transform program already has a terminal transform.",
      ):
          transform_program.push_back(transform1)
  
      transform2 = TransformContainer(
          transform=second_valid_transform, is_informative=False
      )
  
      with pytest.raises(
          TransformError,
          match="The transform program already has a terminal transform.",
      ):
          transform_program.push_back(transform2)
  
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 9 for calling the TestTransformProgram obj's underlying member method code with example usage: obj.test_valid_transforms() without return types