def _apply_bbox_augmentation_wrapper(image, bbox, new_bboxes, prob, augmentation_func, func_changes_bbox, *args):
    'Applies _apply_bbox_augmentation with probability prob.\n\n  Args:\n    image: 3D uint8 Tensor.\n    bbox: 1D Tensor that has 4 elements (min_y, min_x, max_y, max_x)\n      of type float that represents the normalized coordinates between 0 and 1.\n    new_bboxes: 2D Tensor that is a list of the bboxes in the image after they\n      have been altered by aug_func. These will only be changed when\n      func_changes_bbox is set to true. Each bbox has 4 elements\n      (min_y, min_x, max_y, max_x) of type float that are the normalized\n      bbox coordinates between 0 and 1.\n    prob: Float that is the probability of applying _apply_bbox_augmentation.\n    augmentation_func: Augmentation function that will be applied to the\n      subsection of image.\n    func_changes_bbox: Boolean. Does augmentation_func return bbox in addition\n      to image.\n    *args: Additional parameters that will be passed into augmentation_func\n      when it is called.\n\n  Returns:\n    A tuple. Fist element is a modified version of image, where the bbox\n    location in the image will have augmentation_func applied to it if it is\n    chosen to be called with probability `prob`. The second element is a\n    Tensor of Tensors of length 4 that will contain the altered bbox after\n    applying augmentation_func.\n  '
    should_apply_op = tf.cast(tf.floor((tf.random_uniform([], dtype=tf.float32) + prob)), tf.bool)
    if func_changes_bbox:
        (augmented_image, bbox) = tf.cond(should_apply_op, (lambda : augmentation_func(image, bbox, *args)), (lambda : (image, bbox)))
    else:
        augmented_image = tf.cond(should_apply_op, (lambda : _apply_bbox_augmentation(image, bbox, augmentation_func, *args)), (lambda : image))
    new_bboxes = _concat_bbox(bbox, new_bboxes)
    return (augmented_image, new_bboxes)
Applies _apply_bbox_augmentation with probability prob.

Args:
  image: 3D uint8 Tensor.
  bbox: 1D Tensor that has 4 elements (min_y, min_x, max_y, max_x)
    of type float that represents the normalized coordinates between 0 and 1.
  new_bboxes: 2D Tensor that is a list of the bboxes in the image after they
    have been altered by aug_func. These will only be changed when
    func_changes_bbox is set to true. Each bbox has 4 elements
    (min_y, min_x, max_y, max_x) of type float that are the normalized
    bbox coordinates between 0 and 1.
  prob: Float that is the probability of applying _apply_bbox_augmentation.
  augmentation_func: Augmentation function that will be applied to the
    subsection of image.
  func_changes_bbox: Boolean. Does augmentation_func return bbox in addition
    to image.
  *args: Additional parameters that will be passed into augmentation_func
    when it is called.

Returns:
  A tuple. Fist element is a modified version of image, where the bbox
  location in the image will have augmentation_func applied to it if it is
  chosen to be called with probability `prob`. The second element is a
  Tensor of Tensors of length 4 that will contain the altered bbox after
  applying augmentation_func.
def _apply_bbox_augmentation_wrapper(image, bbox, new_bboxes, prob, augmentation_func, func_changes_bbox, *args):
    'Applies _apply_bbox_augmentation with probability prob.\n\n  Args:\n    image: 3D uint8 Tensor.\n    bbox: 1D Tensor that has 4 elements (min_y, min_x, max_y, max_x)\n      of type float that represents the normalized coordinates between 0 and 1.\n    new_bboxes: 2D Tensor that is a list of the bboxes in the image after they\n      have been altered by aug_func. These will only be changed when\n      func_changes_bbox is set to true. Each bbox has 4 elements\n      (min_y, min_x, max_y, max_x) of type float that are the normalized\n      bbox coordinates between 0 and 1.\n    prob: Float that is the probability of applying _apply_bbox_augmentation.\n    augmentation_func: Augmentation function that will be applied to the\n      subsection of image.\n    func_changes_bbox: Boolean. Does augmentation_func return bbox in addition\n      to image.\n    *args: Additional parameters that will be passed into augmentation_func\n      when it is called.\n\n  Returns:\n    A tuple. Fist element is a modified version of image, where the bbox\n    location in the image will have augmentation_func applied to it if it is\n    chosen to be called with probability `prob`. The second element is a\n    Tensor of Tensors of length 4 that will contain the altered bbox after\n    applying augmentation_func.\n  '
    should_apply_op = tf.cast(tf.floor((tf.random_uniform([], dtype=tf.float32) + prob)), tf.bool)
    if func_changes_bbox:
        (augmented_image, bbox) = tf.cond(should_apply_op, (lambda : augmentation_func(image, bbox, *args)), (lambda : (image, bbox)))
    else:
        augmented_image = tf.cond(should_apply_op, (lambda : _apply_bbox_augmentation(image, bbox, augmentation_func, *args)), (lambda : image))
    new_bboxes = _concat_bbox(bbox, new_bboxes)
    return (augmented_image, new_bboxes)