keras/src/layers/preprocessing/random_rotation.py/RandomRotation/call
class RandomRotation:    def call(self, inputs, training=True):
        inputs = self.backend.cast(inputs, self.compute_dtype)
        if training:
            rotation_matrix = self._get_rotation_matrix(inputs)
            transformed_image = self.backend.image.affine_transform(
                images=inputs,
                transform=rotation_matrix,
                interpolation=self.interpolation,
                fill_mode=self.fill_mode,
                fill_value=self.fill_value,
                data_format=self.data_format,
            )
            return transformed_image
        else:
            return inputs