class_docstr: This module implements EoT of changes in brightness by addition of uniformly sampled delta.
docstr: Transformation of an image with randomly sampled brightness.
  
  :param x: Input samples.
  :param y: Label of the samples `x`.
  :return: Transformed samples and labels.
code: def _transform(
      self,
      x: "torch.Tensor",
      y: Optional[
          Union["torch.Tensor", List[Dict[str, "torch.Tensor"]]]
      ],
      **kwargs,
  ) -> Tuple[
      "torch.Tensor",
      Optional[Union["torch.Tensor", List[Dict[str, "torch.Tensor"]]]],
  ]:
      """
      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 torch
  
      delta_i = np.random.uniform(
          low=self.delta_range[0], high=self.delta_range[1]
      )
      return (
          torch.clamp(
              x + delta_i,
              min=self.clip_values[0],
              max=self.clip_values[1],
          ),
          y,
      )
  
file_path: adversarial-robustness-toolbox/art/preprocessing/expectation_over_transformation/natural_corruptions/brightness/pytorch.py
imports: import logging
  from typing import Dict, List, Tuple, Union, TYPE_CHECKING, Optional
  import numpy
  from art.preprocessing.expectation_over_transformation.pytorch import EoTPyTorch
label_desc: Use image node_id 2 for calling the EoTBrightnessPyTorch obj's underlying member method code with example usage: obj._transform(x, y) and returns: torch,  y