code: def apply_augmentation_op(image, op_index, op_level, prob_to_apply):
      """Applies one augmentation op to the image."""
      branch_fns = []
      for augment_op_name in IMAGENET_AUG_OPS:
          augment_fn = augment_ops.NAME_TO_FUNC[augment_op_name]
          level_to_args_fn = LEVEL_TO_ARG[augment_op_name]
  
          def _branch_fn(
              image=image,
              augment_fn=augment_fn,
              level_to_args_fn=level_to_args_fn,
          ):
              args = [image] + list(level_to_args_fn(op_level))
              return augment_fn(*args)
  
          branch_fns.append(_branch_fn)
      aug_image = tf.switch_case(
          op_index, branch_fns, default=lambda: image
      )
      if prob_to_apply is not None:
          return tf.cond(
              tf.random.uniform(shape=[], dtype=tf.float32)
              < prob_to_apply,
              lambda: aug_image,
              lambda: image,
          )
      else:
          return aug_image
  
imports: from typing import Optional
  import tensorflow
  from .randaugment import augment_ops
label_desc: Use image node_id 11 for calling a global function with example usage: apply_augmentation_op(image, op_index, op_level, prob_to_apply) and returns: tf, aug_image, augment_fn