code: def rotate(image, degrees, replace):
      """Rotates the image by degrees either clockwise or counterclockwise.
  
      Args:
        image: An image Tensor of type uint8.
        degrees: Float, a scalar angle in degrees to rotate all images by. If
          degrees is positive the image will be rotated clockwise otherwise it will
          be rotated counterclockwise.
        replace: A one or three value 1D tensor to fill empty pixels caused by the
          rotate operation.
  
      Returns:
        The rotated version of image.
      """
      # Convert from degrees to radians.
      degrees_to_radians = math.pi / 180.0
      radians = degrees * degrees_to_radians
  
      # In practice, we should randomize the rotation degrees by flipping
      # it negatively half the time, but that's done on 'degrees' outside
      # of the function.
      image = contrib_image.rotate(wrap(image), radians)
      return unwrap(image, replace)
  
imports: import dataclasses
  import inspect
  import math
  import tensorflow.compat.v1
  from tensorflow_addons import image
label_desc: Use image node_id 11 for calling a global function with example usage: rotate(image, degrees, replace) and returns: unwrap