          :class:`numpy.ndarray`
              A 4-dimensional array of the same shape as :attr:`batch` with color augmentation
              applied.
          """
          if not self.is_display:
              logger.trace("Augmenting color")
              batch = batch_convert_color(batch, "BGR2LAB")
              batch = self._random_clahe(batch)
              batch = self._random_lab(batch)
              batch = batch_convert_color(batch, "LAB2BGR")
          return batch
  
      def _random_clahe(self, batch):
          """ Randomly perform Contrast Limited Adaptive Histogram Equalization on
          a batch of images """
 
</s> remove     def _random_clahe(self, batch):
 </s> add     def _random_clahe(self, batch: np.ndarray) -> None: </s> remove         base_contrast = self._constants["clahe_base_contrast"]
 </s> add         base_contrast = self._constants.clahe_base_contrast </s> remove 
        Returns
        ----------
        :class:`numpy.ndarray`
            A 4-dimensional array of the same shape as :attr:`batch` with transformation applied.
 </s> add  </s> remove 
        Returns
        ----------
        :class:`numpy.ndarray`
            A 4-dimensional array of the same shape as :attr:`batch` with transformation applied.
 </s> add  </s> remove         if self.is_display:
            return batch
        logger.trace("Randomly transforming image")
        rotation_range = self._config.get("rotation_range", 10)
        zoom_range = self._config.get("zoom_amount", 5) / 100
        shift_range = self._config.get("shift_range", 5) / 100

        rotation = np.random.uniform(-rotation_range,
                                     rotation_range,
 </s> add         logger.trace("Randomly transforming image")  # type: ignore

        rotation = np.random.uniform(-self._constants.transform_rotation,
                                     self._constants.transform_rotation,
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
          :class:`numpy.ndarray`
              A 4-dimensional array of the same shape as :attr:`batch` with color augmentation
              applied.
          """
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
        logger.trace("Augmenting color")  # type: ignore
        batch = batch_convert_color(batch, "BGR2LAB")
        self._random_lab(batch)
        self._random_clahe(batch)
        batch = batch_convert_color(batch, "LAB2BGR")
          return batch
  
      def _random_clahe(self, batch):
          """ Randomly perform Contrast Limited Adaptive Histogram Equalization on
          a batch of images """
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
lib/training/augmentation.py