code: def test_non_empty_chat_messages(self):
      prompt_builder = DynamicChatPromptBuilder(
          runtime_variables=["documents"]
      )
      prompt_source = [
          ChatMessage.from_system(content="Hello"),
          ChatMessage.from_user(content="Hello, {{ who }}!"),
      ]
      template_variables = {"who": "World"}
  
      result = prompt_builder.run(prompt_source, template_variables)
  
      assert result == {
          "prompt": [
              ChatMessage.from_system(content="Hello"),
              ChatMessage.from_user(content="Hello, World!"),
          ]
      }
  
file_path: haystack/test/components/builders/test_dynamic_chat_prompt_builder.py
imports: from typing import List
  import pytest
  from haystack import Pipeline
  from haystack.components.builders import DynamicChatPromptBuilder
  from haystack.dataclasses import ChatMessage
label_desc: Use image node_id 2 for calling the TestDynamicChatPromptBuilder obj's underlying member method code with example usage: obj.test_non_empty_chat_messages() without return types