class_docstr: Apply glass noise to the input image.
  
  Args:
      sigma (float): standard deviation for Gaussian kernel.
      max_delta (int): max distance between pixels which are swapped.
      iterations (int): number of repeats.
          Should be in range [1, inf). Default: (2).
      mode (str): mode of computation: fast or exact. Default: "fast".
      p (float): probability of applying the transform. Default: 0.5.
  
  Targets:
      image
  
  Image types:
      uint8, float32
  
  Reference:
  |  https://arxiv.org/abs/1903.12261
  |  https://github.com/hendrycks/robustness/blob/master/ImageNet-C/create_c/make_imagenet_c.py
class_docstr_tok: ["Apply","glass","noise","to","the","input","image",".","Args",":","sigma","(","float",")",":","standard","deviation","for","Gaussian","kernel",".","max_delta","(","int",")",":","max","distance","between","pixels","which","are","swapped",".","iterations","(","int",")",":","number","of","repeats",".","Should","be","in","range","[","1",",","inf",")",".","Default",":","(","2",")",".","mode","(","str",")",":","mode","of","computation",":","fast","or","exact",".","Default",":","``","fast","''",".","p","(","float",")",":","probability","of","applying","the","transform",".","Default",":","0.5",".","Targets",":","image","Image","types",":","uint8",",","float32","Reference",":","|","https",":","\/\/arxiv.org\/abs\/1903.12261","|","https",":","\/\/github.com\/hendrycks\/robustness\/blob\/master\/ImageNet-C\/create_c\/make_imagenet_c.py"]
code: def __init__(
      self,
      sigma: float = 0.7,
      max_delta: int = 4,
      iterations: int = 2,
      always_apply: bool = False,
      mode: str = "fast",
      p: float = 0.5,
  ):
      super().__init__(always_apply=always_apply, p=p)
      if iterations < 1:
          raise ValueError(
              f"Iterations should be more or equal to 1, but we got {iterations}"
          )
  
      if mode not in ["fast", "exact"]:
          raise ValueError(
              f"Mode should be 'fast' or 'exact', but we got {mode}"
          )
  
      self.sigma = sigma
      self.max_delta = max_delta
      self.iterations = iterations
      self.mode = mode
  
imports: import random
  import warnings
  from typing import Any, Dict, List, Sequence, Tuple
  import cv2
  import numpy
  from albumentations import random_utils
  from albumentations.augmentations import functional
  from albumentations.augmentations.blur import functional
  from albumentations.core.transforms_interface import ImageOnlyTransform, ScaleFloatType, ScaleIntType, to_tuple
label_desc: Use image node_id 1 to create a new GlassBlur object from inherited base classes: Blur with example: obj = GlassBlur(sigma, max_delta, iterations, always_apply, mode, p)