class_docstr: Apply CLAHE equalization on the input tensor randomly.
  
  .. image:: _static/img/equalize_clahe.png
  
  Args:
      clip_limit: threshold value for contrast limiting. If 0 clipping is disabled.
      grid_size: number of tiles to be cropped in each direction (GH, GW).
      slow_and_differentiable: flag to select implementation
      same_on_batch: apply the same transformation across the batch.
      p: probability of applying the transformation.
      keepdim: whether to keep the output shape the same as input (True) or broadcast it
               to the batch form (False).
  .. note::
      This function internally uses :func:`kornia.enhance.equalize_clahe`.
  
  Examples:
      >>> img = torch.rand(1, 10, 20)
      >>> aug = RandomClahe()
      >>> res = aug(img)
      >>> res.shape
      torch.Size([1, 1, 10, 20])
  
      >>> img = torch.rand(2, 3, 10, 20)
      >>> aug = RandomClahe()
      >>> res = aug(img)
      >>> res.shape
      torch.Size([2, 3, 10, 20])
  
  To apply the exact augmenation again, you may take the advantage of the previous parameter state:
      >>> input = torch.rand(1, 3, 32, 32)
      >>> aug = RandomClahe(p=1.)
      >>> (aug(input) == aug(input, params=aug._params)).all()
      tensor(True)
code: def apply_transform(
      self,
      input: Tensor,
      params: dict[str, Tensor],
      flags: dict[str, Any],
      transform: Optional[Tensor] = None,
  ) -> Tensor:
      clip_limit = float(params["clip_limit_factor"][0])
      return equalize_clahe(
          input,
          clip_limit,
          flags["grid_size"],
          flags["slow_and_differentiable"],
      )
  
file_path: kornia/kornia/augmentation/_2d/intensity/clahe.py
imports: from __future__ import annotations
  from typing import Any, Optional
  from kornia.augmentation import random_generator
  from kornia.augmentation._2d.intensity.base import IntensityAugmentationBase2D
  from kornia.core import Tensor
  from kornia.enhance import equalize_clahe
label_desc: Use image node_id 2 for calling the RandomClahe obj's underlying member method code with example usage: obj.apply_transform(input, params, flags, transform) and returns: equalize_clahe