code: def preflight(
      self,
      project: str,
      domain: str,
      private_ssh_key: str,
      options: dict,
  ):
      if "openai" in options:
          # TODO(egor-s): custom entrypoint domain
          entrypoint = f"gateway.{domain.split('.', maxsplit=1)[1]}"
          self.register_openai_entrypoint(project, entrypoint)
      resp = self.s.post(
          self._url(f"/api/registry/{project}/preflight"),
          json={
              "public_domain": domain,
              "ssh_private_key": private_ssh_key,
              "options": options,
          },
      )
      if resp.status_code == 400:
          raise gateway_error(resp.json())
      resp.raise_for_status()
  
file_path: dstack/src/dstack/_internal/server/services/gateways/client.py
imports: import requests
  from dstack._internal.core.errors import GatewayError
  from dstack._internal.core.models.runs import Job, JobProvisioningData
label_desc: Use image node_id 5 for calling the GatewayClient obj's underlying member method code with example usage: obj.preflight(project, domain, private_ssh_key, options) without return types