class_docstr: This module implements Expectation over Transformation preprocessing for image rotation in TensorFlow.
docstr: Transformation of an input image and its label by randomly sampled rotation.
  
  :param x: Input samples.
  :param y: Label of the samples `x`.
  :return: Transformed samples and labels.
code: def _transform(
      self, x: "tf.Tensor", y: Optional["tf.Tensor"], **kwargs
  ) -> Tuple["tf.Tensor", Optional["tf.Tensor"]]:
      """
      Transformation of an input image and its label by randomly sampled rotation.
  
      :param x: Input samples.
      :param y: Label of the samples `x`.
      :return: Transformed samples and labels.
      """
      import tensorflow as tf
      import tensorflow_addons as tfa
  
      # pylint: disable=E1120,E1123
      angles = tf.random.uniform(
          shape=(),
          minval=self.angles_range[0],
          maxval=self.angles_range[1],
      )
      angles = angles / 360.0 * 2.0 * np.pi
      x_preprocess = tfa.image.rotate(
          images=x, angles=angles, interpolation="NEAREST", name=None
      )
      x_preprocess = tf.clip_by_value(
          t=x_preprocess,
          clip_value_min=-self.clip_values[0],
          clip_value_max=self.clip_values[1],
          name=None,
      )
      return x_preprocess, y
  
file_path: adversarial-robustness-toolbox/art/preprocessing/expectation_over_transformation/image_rotation/tensorflow.py
imports: import logging
  from typing import Optional, TYPE_CHECKING, Tuple, Union
  import numpy
  from art.preprocessing.expectation_over_transformation.tensorflow import EoTTensorFlowV2
label_desc: Use image node_id 2 for calling the EoTImageRotationTensorFlow obj's underlying member method code with example usage: obj._transform(x, y) and returns: x_preprocess,  y