code: def test_restful_api(
      deployment, query, deployment_name, restful_api_port
  ):
      # Verify deployment is running
      outputs = deployment(query, max_length=128)
      assert outputs[0], "output is empty"
  
      # Verify REST API
      url = f"http://localhost:{restful_api_port}/mii/{deployment_name}"
      params = {"prompts": query, "max_length": 128}
      json_params = json.dumps(params)
      result = requests.post(
          url,
          data=json_params,
          headers={"Content-Type": "application/json"},
      )
      assert result.status_code == 200
      assert "generated_text" in result.json()[0]
  
file_path: deepspeed-mii/tests/test_deployment.py
imports: import pytest
  import json
  import re
  import requests
  import subprocess
  import time
  import mii
label_desc: Use image node_id 10 for calling a global function with example usage: test_restful_api(deployment, query, deployment_name, restful_api_port) without return types