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