code: def unparse_host_port(host: str, port: int | None = None) -> str:
      """
      Undo parse_host_port().
      """
      if ":" in host and not host.startswith("["):
          host = f"[{host}]"
      if port is not None:
          return f"{host}:{port}"
      else:
          return host
  
file_path: distributed/distributed/comm/addressing.py
imports: from __future__ import annotations
  import itertools
  import dask
  from distributed.comm import registry
  from distributed.utils import get_ip_interface
label_desc: Use image node_id 5 for calling a global function with example usage: unparse_host_port(host, port) and returns: host, str, port, host