code: def batch_random_blur(images, height, width, blur_probability=0.5):
      """Random blur to all frames.
  
      All frames have a blur applied to them, or all do not.
  
      Args:
        images: `Tensor` of shape [timesteps, height, width, 3]..
        height: the height of image.
        width: the width of image.
        blur_probability: the probaility to apply the blur operator.
  
      Returns:
        Blurred images.
      """
  
      def generate_selector(p, bsz):
          shape = [bsz, 1, 1, 1]
          selector = tf.cast(
              tf.less(
                  tf.random.uniform(shape, 0, 1, dtype=tf.float32), p
              ),
              tf.float32,
          )
          return selector
  
      images_new = simclr_data.random_blur(images, height, width, p=1.0)
      # All frames have augmentation applied, or not.
      selector = generate_selector(blur_probability, 1)
      images = images_new * selector + images * (1 - selector)
      images = tf.clip_by_value(images, 0.0, 1.0)
  
      return images
  
imports: import functools
  import math
  from typing import Optional
  from absl import logging
  from dmvr import builders
  from dmvr import processors
  import simclr.tf2.data_util
  import tensorflow
  from official.vision.image_classification import augment
label_desc: Use image node_id 6 for calling a global function with example usage: batch_random_blur(images, height, width, blur_probability) and returns: images, selector