code: def __init__(self, deployment_name, rest_host, rest_port, rest_procs):
      threading.Thread.__init__(self)
  
      app = createRestfulGatewayApp(deployment_name, self)
      self.server = make_server(
          rest_host,
          rest_port,
          app,
          threaded=False,
          processes=rest_procs,
      )
      self.ctx = app.app_context()
      self.ctx.push()
  
      self._stop_event = threading.Event()
  
file_path: deepspeed-mii/mii/grpc_related/restful_gateway.py
imports: import asyncio
  import time
  import threading
  from flask import Flask, request, jsonify
  from flask_restful import Resource, Api
  from werkzeug.serving import make_server
  import mii
  from mii.constants import RESTFUL_GATEWAY_SHUTDOWN_TIMEOUT, RESTFUL_API_PATH
label_desc: Use image node_id 1 to create a new RestfulGatewayThread object from inherited base classes: threading with example: obj = RestfulGatewayThread(deployment_name, rest_host, rest_port, rest_procs)