code: def test_completions_response():
      completions.ResponsePayload(
          id="completions-id-1",
          object="text_completion",
          created=int(time.time()),
          model="gpt-4",
          choices=[
              completions.Choice(
                  index=0,
                  text="text",
                  finish_reason="stop",
              )
          ],
          usage=completions.CompletionsUsage(
              prompt_tokens=1,
              completion_tokens=1,
              total_tokens=2,
          ),
      )
  
      completions.ResponsePayload(
          object="text_completion",
          created=int(time.time()),
          model="hf-tgi",
          choices=[
              completions.Choice(
                  index=0,
                  text="text",
                  finish_reason="stop",
              ),
              completions.Choice(
                  index=1,
                  text="text",
                  finish_reason="length",
              ),
              completions.Choice(
                  index=2,
                  text="text",
                  finish_reason="foo",
              ),
              completions.Choice(
                  index=3,
                  text="text",
                  finish_reason=None,
              ),
          ],
          usage=completions.CompletionsUsage(
              prompt_tokens=None,
              completion_tokens=None,
              total_tokens=None,
          ),
      )
  
      with pytest.raises(
          pydantic.ValidationError, match=r"(?i)field required"
      ):
          completions.ResponsePayload(**{"usage": {}})
  
imports: import time
  import pydantic
  import pytest
  from mlflow.gateway.schemas import completions
label_desc: Use image node_id 2 for calling a global function with example usage: test_completions_response() without return types