class_docstr: Test the dunder methods.
docstr: Test that an error is raised if two programs are added when both have
  terminal transforms
docstr_tok: ["Test","that","an","error","is","raised","if","two","programs","are","added","when","both","have","terminal","transforms"]
code: def test_add_both_final_transform_programs(self):
      """Test that an error is raised if two programs are added when both have
      terminal transforms"""
      transform1 = TransformContainer(transform=first_valid_transform)
      transform2 = TransformContainer(
          transform=second_valid_transform, final_transform=True
      )
  
      transform_program1 = TransformProgram()
      transform_program1.push_back(transform1)
      transform_program1.push_back(transform2)
  
      transform_program2 = TransformProgram()
      transform_program2.push_back(transform1)
      transform_program2.push_back(transform2)
  
      with pytest.raises(
          TransformError,
          match="The transform program already has a terminal transform",
      ):
          _ = transform_program1 + transform_program2
  
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 5 for calling the TestTransformProgramDunders obj's underlying member method code with example usage: obj.test_add_both_final_transform_programs() without return types