code: def server_url(
      host: str | None = None,
      port: int | None = None,
      ssl: bool = False,
  ) -> str:
      protocol = "https" if ssl else "http"
      return f"{protocol}://{host or DEFAULT_SERVER_HOST}:{port or DEFAULT_SERVER_PORT}/"
  
imports: from __future__ import annotations
  import logging
  import json
  import os
  import re
  from os.path import relpath
  from pathlib import Path
  from typing import TYPE_CHECKING, Callable, ClassVar, Literal, Protocol, TypedDict, Union, cast, get_args
  from .None import __version__
  from .core.templates import CSS_RESOURCES, JS_RESOURCES
  from .core.types import ID, PathLike
  from .model import Model
  from .settings import LogLevel, settings
  from .util.dataclasses import dataclass, field
  from .util.paths import ROOT_DIR
  from .util.token import generate_session_id
  from .util.version import is_full_release
label_desc: Use image node_id 1 for calling a global function with example usage: server_url(host, port, ssl) and returns: protocol, str, unknown, str, unknown, str