def parse_tcp_uri(uri):
    """Parse tcp://<host>:<port>.

    """

    try:
        if uri[:6] != 'tcp://':
            raise ValueError

        address, port = uri[6:].split(':')

        return address, int(port)
    except (ValueError, TypeError):
        raise ValueError(
            f"Expected URI on the form tcp://<host>:<port>, but got '{uri}'.")