class_docstr: The following are our end-to-end integration tests.
  This suite of tests will bring up a rest server on an available port
  and ping different endpoints using `RemoteService`.
code: def start_temp_server() -> TempServerInfo:
      def get_free_port() -> str:
          sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          # When binding a socket to port 0, the kernel will assign it a free port
          sock.bind(("", 0))
          port = str(sock.getsockname()[1])
          # Queue up to 10 requests
          sock.listen(10)
          return port
  
      def create_root_account() -> str:
          path: str = tempfile.mkdtemp()
  
          with SqliteDict(os.path.join(path, ACCOUNTS_FILE)) as cache:
              account: Account = Account(
                  TestRemoteServerService._ADMIN_API_KEY, is_admin=True
              )
              cache[TestRemoteServerService._ADMIN_API_KEY] = asdict(
                  account
              )
              cache.commit()
          return path
  
      rest_port: str = os.environ.get("TEST_PORT", get_free_port())
      url: str = f"http://127.0.0.1:{rest_port}"
      base_path: str = create_root_account()
  
      # Start server in a separate thread
      try:
          subprocess.Popen(
              " ".join(
                  [
                      TestRemoteServerService._SERVER_EXECUTABLE,
                      f"--port {rest_port}",
                      f"--base-path {base_path}",
                      "--workers 16",
                  ]
              ),
              shell=True,
          )
      except subprocess.CalledProcessError as e:
          print(
              f"There was an error while creating the temp instance: {str(e)}"
          )
          raise
  
      # Return the URL of the newly started server
      return TempServerInfo(url, base_path)
  
imports: import os
  import random
  import shutil
  import tempfile
  import requests
  import socket
  import subprocess
  import time
  from functools import partial
  from multiprocessing import Pool
  from dataclasses import asdict, dataclass
  from typing import List
  from sqlitedict import SqliteDict
  from helm.common.authentication import Authentication
  from helm.common.request import Request, RequestResult
  from helm.common.tokenization_request import TokenizationRequest, TokenizationRequestResult
  from helm.proxy.accounts import Account
  from .remote_service import RemoteService
  from .service import ACCOUNTS_FILE
label_desc: Use image node_id 1 for calling the TestRemoteServerService obj's underlying member method code with example usage: obj.start_temp_server() and returns: TempServerInfo, port, path