def _transform(self, x: "tf.Tensor", y: "tf.Tensor" | None, **kwargs) -> tuple["tf.Tensor", "tf.Tensor" | None]:
        """
        Transformation of an image with randomly sampled brightness.

        :param x: Input samples.
        :param y: Label of the samples `x`.
        :return: Transformed samples and labels.
        """
        import tensorflow as tf

        delta_i = np.random.uniform(low=self.delta_range[0], high=self.delta_range[1])
        return tf.clip_by_value(x + delta_i, clip_value_min=self.clip_values[0], clip_value_max=self.clip_values[1]), y

        Transformation of an image with randomly sampled brightness.

        :param x: Input samples.
        :param y: Label of the samples `x`.
        :return: Transformed samples and labels.
        
art/preprocessing/expectation_over_transformation/natural_corruptions/brightness/tensorflow.py