code: def random_solarization(image, p=0.2):
      def _transform(image):
          image = image * tf.cast(tf.less(image, 0.5), tf.float32) + (
              1.0 - image
          ) * tf.cast(tf.greater_equal(image, 0.5), tf.float32)
          return image
  
      return simclr_data.random_apply(_transform, p=p, x=image)
  
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 7 for calling a global function with example usage: random_solarization(image, p) and returns: simclr_data, image