code: def test_prompt_template_partial_formatting():
      prompt = PromptTemplate(template_str="Say {foo} {baz}")
      partial_prompt = prompt.partial_fill(foo="bar")
      assert partial_prompt.format(baz="qux") == "Say bar qux"
      assert partial_prompt.format(baz=None) == ""
  
      prompt = PromptTemplate(template_str=["Say {foo}", " {baz}"])
      partial_prompt = prompt.partial_fill(foo="bar")
      assert partial_prompt.format(baz="qux") == "Say bar qux"
      assert partial_prompt.format(baz=None) == "Say bar"
      assert partial_prompt.format() == "Say bar"
  
imports: from mlflow.metrics.genai.prompt_template import PromptTemplate
label_desc: Use image node_id 3 for calling a global function with example usage: test_prompt_template_partial_formatting() without return types