def parse_address(address):
    """Convert host:port or port to address to pass to connect."""
    if ':' not in address:
        return ('', int(address))
    host, port = address.rsplit(':', 1)
    return (host, int(port))