code: def test_promptlab_prompt_replacement():
      data = pd.DataFrame(
          data=[
              {"thing": "books"},
              {"thing": "coffee"},
              {"thing": "nothing"},
          ]
      )
  
      model = construct_model("completions")
      get_route_patch = mock.patch(
          "mlflow.gateway.get_route",
          return_value=mock.Mock(route_type="llm/v1/completions"),
      )
  
      with get_route_patch, mock.patch(
          "mlflow.gateway.query"
      ) as mock_query:
          model.predict(data)
  
          calls = [
              mock.call(
                  route="completions",
                  data={
                      "prompt": f"Write me a story about {thing}.",
                      "temperature": 0.5,
                      "max_tokens": 10,
                  },
              )
              for thing in data["thing"]
          ]
  
          mock_query.assert_has_calls(calls, any_order=True)
  
file_path: mlflow/tests/promptlab/test_promptlab_model.py
imports: from unittest import mock
  import pandas
  from mlflow.entities.param import Param
  from mlflow.gateway import set_gateway_uri
  from mlflow.promptlab import _PromptlabModel
label_desc: Use image node_id 2 for calling a global function with example usage: test_promptlab_prompt_replacement() without return types