def _apply_func_with_prob(func, image, args, prob, bboxes):
    'Apply `func` to image w/ `args` as input with probability `prob`.'
    assert isinstance(args, tuple)
    assert ('bboxes' == inspect.getfullargspec(func)[0][1])
    if ('prob' in inspect.getfullargspec(func)[0]):
        prob = 1.0
    should_apply_op = tf.cast(tf.floor((tf.random_uniform([], dtype=tf.float32) + prob)), tf.bool)
    (augmented_image, augmented_bboxes) = tf.cond(should_apply_op, (lambda : func(image, bboxes, *args)), (lambda : (image, bboxes)))
    return (augmented_image, augmented_bboxes)
Apply `func` to image w/ `args` as input with probability `prob`.
def _apply_func_with_prob(func, image, args, prob, bboxes):
    
    assert isinstance(args, tuple)
    assert ('bboxes' == inspect.getfullargspec(func)[0][1])
    if ('prob' in inspect.getfullargspec(func)[0]):
        prob = 1.0
    should_apply_op = tf.cast(tf.floor((tf.random_uniform([], dtype=tf.float32) + prob)), tf.bool)
    (augmented_image, augmented_bboxes) = tf.cond(should_apply_op, (lambda : func(image, bboxes, *args)), (lambda : (image, bboxes)))
    return (augmented_image, augmented_bboxes)