code: def split_host_and_port(netloc: str) -> Tuple[str, Optional[int]]:
      
      match = re.match(r"^(.+):(\d+)$", netloc)
      if match:
          host = match.group(1)
          port = int(match.group(2))  # type: Optional[int]
      else:
          host = netloc
          port = None
      return (host, port)
docs: Returns ``(host, port)`` tuple from ``netloc``.
  
      Returned ``port`` will be ``None`` if not present.
  
      .. versionadded:: 4.1