code: def posterize(image, bits):
      """Equivalent of PIL Posterize."""
      shift = tf.cast(8 - bits, image.dtype)
      return tf.bitwise.left_shift(
          tf.bitwise.right_shift(image, shift), shift
      )
  
imports: import math
  import tensorflow
  import tensorflow_addons
label_desc: Use image node_id 11 for calling a global function with example usage: posterize(image, bits) and returns: tf