def find_fired_conditions(conditions, guard=None, *args, **kwargs):
    """
    For an iterable (e.g. list) of boolean functions, find a list of
    functions returning ``True``.

    If ``guard`` is given, it is applied to a function to get the
    predicate - a function ``() -> bool``. If this predicate is
    not ``None``, it is checked and the condition is then evaluated
    if and only if the predicate returns ``True``. If ``guard`` is
    not provided, or the predicate is ``None``, condition is tested
    without additional check. Normally the predicate should be a
    very short function allowing to test whether a complex condition
    need to be evaluated.

    Args:
        conditions: an iterable of boolean functions

        guard: a ``(condition) -> predicate`` function, where
            ``predicate`` is ``() -> bool``.

        *args: positional arguments passed to each condition

        **kwargs: keyword arguments passed to each condition

    Returns: a list of conditions evaluated to ``True``
    """
    fired = []
    if guard is not None:
        for condition in conditions:
            g = guard(condition)
            if g is not None and g():
                if condition(*args, **kwargs):
                    fired.append(condition)
            else:
                if condition(*args, **kwargs):
                    fired.append(condition)
    return fired