def condition(unused_time, elements_finished, *_):
    return math_ops.logical_not(math_ops.reduce_all(elements_finished))
def condition(unused_time, elements_finished, *_):
    return math_ops.logical_not(math_ops.reduce_all(elements_finished))