code: def register_service(
      self,
      project: str,
      job: Job,
      job_provisioning_data: JobProvisioningData,
  ):
      payload = {
          "public_domain": job.job_spec.gateway.hostname,
          "app_port": job.job_spec.gateway.service_port,
          "ssh_host": f"{job_provisioning_data.username}@{job_provisioning_data.hostname}",
          "ssh_port": job_provisioning_data.ssh_port,
          "options": job.job_spec.gateway.options,
      }
      if job_provisioning_data.dockerized:
          payload["docker_ssh_host"] = f"root@localhost"
          payload["docker_ssh_port"] = 10022
      resp = self.s.post(
          self._url(f"/api/registry/{project}/register"), json=payload
      )
      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 2 for calling the GatewayClient obj's underlying member method code with example usage: obj.register_service(project, job, job_provisioning_data) without return types