def default_func(entity, attribute, value):
    """
    Look in the entity for an attribute with the provided value.
    First real object attributes are checked, then, if available,
    extended fields. If neither of these are present, return ``False``.
    """
    try:
        return getattr(entity, attribute) == value
    except AttributeError:
        try:
            return entity.fields[attribute] == value
        except (AttributeError, KeyError):
            return False
