def _connection_refused(exc: Exception, /) -> bool:
    """
    Match the exception that is raised when the Tahoe-LAFS client node does
    not accept the API call connection attempt.
    """
    # Note this is the exception from Twisted, not the builtin exception.
    return isinstance(exc, ConnectionRefusedError)