code: def get_address_host_port(
      addr: str, strict: bool = False
  ) -> tuple[str, int]:
      """
      Get a (host, port) tuple out of the given address.
      For definition of strict check parse_address
      ValueError is raised if the address scheme doesn't allow extracting
      the requested information.
  
      >>> get_address_host_port('tcp://1.2.3.4:80')
      ('1.2.3.4', 80)
      >>> get_address_host_port('tcp://[::1]:80')
      ('::1', 80)
      """
      scheme, loc = parse_address(addr, strict=strict)
      backend = registry.get_backend(scheme)
      try:
          return backend.get_address_host_port(loc)
      except NotImplementedError:
          raise ValueError(
              f"don't know how to extract host and port for address {addr!r}"
          )
  
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 6 for calling a global function with example usage: get_address_host_port(addr, strict) and returns: backend