code: def test_to_dict():
      builder = PromptBuilder(template="This is a {{ variable }}")
      res = builder.to_dict()
      assert res == {
          "type": "haystack.components.builders.prompt_builder.PromptBuilder",
          "init_parameters": {"template": "This is a {{ variable }}"},
      }
  
imports: import pytest
  from haystack.components.builders.prompt_builder import PromptBuilder
label_desc: Use image node_id 2 for calling a global function with example usage: test_to_dict() without return types