code: def test_missing_template_variables(self):
      prompt_builder = DynamicPromptBuilder(
          runtime_variables=["documents"]
      )
  
      # missing template variable city
      with pytest.raises(ValueError):
          prompt_builder._validate_template(
              "Hello, I'm {{ name }}, and I live in {{ city }}.",
              {"name"},
          )
  
      # missing template variable name
      with pytest.raises(ValueError):
          prompt_builder._validate_template(
              "Hello, I'm {{ name }}, and I live in {{ city }}.",
              {"city"},
          )
  
      # completely unknown template variable
      with pytest.raises(ValueError):
          prompt_builder._validate_template(
              "Hello, I'm {{ name }}, and I live in {{ city }}.",
              {"age"},
          )
  
file_path: haystack/test/components/builders/test_dynamic_prompt_builder.py
imports: from typing import List
  import pytest
  from jinja2 import TemplateSyntaxError
  from haystack import component, Document, Pipeline
  from haystack.components.builders import DynamicPromptBuilder
label_desc: Use image node_id 5 for calling the TestDynamicPromptBuilder obj's underlying member method code with example usage: obj.test_missing_template_variables() without return types