human
Complete this python program:
def condition(cond, brule):
assistant
#Here is the Python code you requested.

    """Only apply branching rule if condition is true
    """
    def conditioned_brl(expr):
        if cond(expr):
            for x in brule(expr):
                (yield x)
        else:
            pass
    return conditioned_brl