def is_closed(instance, *args, **kwargs):
    """
    Helper function to test if some instance is closed (to be used with
    ``raise_if`` decorator)

    :param instance: some instance with ``is_closed`` property accessible
    :returns:        value of ``instance.is_closed`` or False

    """
    return getattr(instance, 'is_closed', False)