code: def simclr_aug_fn(frames, num_frames):
      """Applies the Simclr Augment policy to one video clip.
  
      Args:
        frames: `Tensor` of shape [timesteps, height, width, 3].
        num_frames: number of frames.
  
      Returns:
        A Tensor of shape [timesteps, output_h, output_w, channels] being random
        augmented with the same operation.
      """
  
      def random_color_jitter(image, p=1.0):
          def _transform(image):
              color_jitter_t = functools.partial(
                  simclr_data.color_jitter, strength=0.75
              )
              image = simclr_data.random_apply(
                  color_jitter_t, p=0.8, x=image
              )
              return simclr_data.random_apply(
                  simclr_data.to_grayscale, p=0.2, x=image
              )
  
          return simclr_data.random_apply(_transform, p=p, x=image)
  
      frame_list = tf.unstack(frames, num_frames, 0)
      # Temporally random version
      # simclr_aug_frame_list = []
      # for image in frame_list:
      #     image = random_color_jitter(image)
      #     simclr_aug_frame_list.append(image)
      # return tf.stack(simclr_aug_frame_list, axis=0)
  
      # Temporally consistent version
      big_image = tf.concat(frame_list, axis=0)  # [t*h, w, c]
      big_image = random_color_jitter(big_image)
      simclr_aug_frame_list = tf.split(
          big_image, num_or_size_splits=num_frames
      )
      return tf.stack(simclr_aug_frame_list, axis=0)
  
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 5 for calling a global function with example usage: simclr_aug_fn(frames, num_frames) and returns: tf, simclr_data, simclr_data