code: def glass_blur(
      img: np.ndarray,
      sigma: float,
      max_delta: int,
      iterations: int,
      dxy: np.ndarray,
      mode: str,
  ) -> np.ndarray:
      x = cv2.GaussianBlur(np.array(img), sigmaX=sigma, ksize=(0, 0))
  
      if mode == "fast":
          hs = np.arange(img.shape[0] - max_delta, max_delta, -1)
          ws = np.arange(img.shape[1] - max_delta, max_delta, -1)
          h: Union[int, np.ndarray] = np.tile(hs, ws.shape[0])
          w: Union[int, np.ndarray] = np.repeat(ws, hs.shape[0])
  
          for i in range(iterations):
              dy = dxy[:, i, 0]
              dx = dxy[:, i, 1]
              x[h, w], x[h + dy, w + dx] = x[h + dy, w + dx], x[h, w]
  
      elif mode == "exact":
          for ind, (i, h, w) in enumerate(
              product(
                  range(iterations),
                  range(img.shape[0] - max_delta, max_delta, -1),
                  range(img.shape[1] - max_delta, max_delta, -1),
              )
          ):
              ind = ind if ind < len(dxy) else ind % len(dxy)
              dy = dxy[ind, i, 0]
              dx = dxy[ind, i, 1]
              x[h, w], x[h + dy, w + dx] = x[h + dy, w + dx], x[h, w]
      else:
          ValueError(
              f"Unsupported mode `{mode}`. Supports only `fast` and `exact`."
          )
  
      return cv2.GaussianBlur(x, sigmaX=sigma, ksize=(0, 0))
  
file_path: albumentations/albumentations/augmentations/blur/functional.py
imports: from itertools import product
  from math import ceil
  from typing import Sequence, Union
  import cv2
  import numpy
  from albumentations.augmentations.functional import convolve
  from albumentations.augmentations.geometric.functional import scale
  from albumentations.augmentations.utils import _maybe_process_in_chunks, clipped, preserve_shape
label_desc: Use image node_id 4 for calling a global function with example usage: glass_blur(img, sigma, max_delta, iterations, dxy, mode) and returns: cv2