code: def run(self):
      assert not self.http_server, (
          "This class is not reentrable. "
          "Please create a new instance."
      )
  
      class Server(SimpleHTTPServer.SimpleHTTPRequestHandler):
          timeout = self.timeout
  
          def do_GET(self):
              if self.path == "/":
                  self.send_response(200)
                  self.send_header("Connection", "close")
                  self.end_headers()
                  self.wfile.write(b"Hello world")
              elif self.path == "/json":
                  self.send_response(200)
                  self.send_header("Content-type", "application/json")
                  self.send_header("Connection", "close")
                  self.end_headers()
                  self.wfile.write(b'{"hello":"world"}')
              elif self.path == "/json/plain":
                  self.send_response(200)
                  self.send_header(
                      "Content-type", "text/plain;charset=utf-8"
                  )
                  self.send_header("Connection", "close")
                  self.end_headers()
                  self.wfile.write(b'{"hello":"world"}')
              else:
                  self.send_response(404)
                  self.send_header("Connection", "close")
                  self.send_header("X-test-header", "hello")
                  self.end_headers()
                  self.wfile.write(b"Not found")
              self.connection.close()
  
      # ThreadingTCPServer offloads connections to separate threads, so
      # the serve_forever loop doesn't block until connection is closed
      # (unlike TCPServer). This allows to shutdown the serve_forever loop
      # even if there's an open connection.
      try:
          self.http_server = SocketServer.ThreadingTCPServer(
              (self.server_host, 0), Server
          )
  
          # don't hang if there're some open connections
          self.http_server.daemon_threads = True
  
          self.server_port = self.http_server.server_address[1]
      except Exception as e:
          self.socket_created_future.set_exception(e)
          raise
      else:
          self.socket_created_future.set_result(True)
  
      self.http_server.serve_forever()
  
imports: import base64
  import http.server
  import select
  import socket
  import socketserver
  import threading
  from urllib.request import urlopen
label_desc: Use image node_id 5 for calling the HttpServerThread obj's underlying member method code with example usage: obj.run() without return types