code: def zoom_blur(
      x: np.ndarray,
      max_zoom: float,
      step_zoom: float,
      xrange: tuple = None,
  ) -> np.ndarray:
      """
      Apply zoom blur.
  
      Parameters
      ----------
      x
          Instance to be perturbed.
      max_zoom
          Max zoom strength.
      step_zoom
          Step size to go from 1 to `max_zoom` strength.
      xrange
          Tuple with min and max data range.
  
      Returns
      -------
      Perturbed instance.
      """
      x, scale_back = scale_minmax(x, xrange)
      zoom_factors = np.arange(1, max_zoom, step_zoom)
      out = np.zeros_like(x)
      for zoom_factor in zoom_factors:
          out += clipped_zoom(x, zoom_factor)
      x_z = (x + out) / (len(zoom_factors) + 1)
      if scale_back:
          x_z = x_z * (xrange[1] - xrange[0]) + xrange[0]
      if isinstance(xrange, tuple):
          return np.clip(x_z, xrange[0], xrange[1])
      else:
          return x_z
  
imports: import random
  from io import BytesIO
  from typing import List, Tuple, Union
  import cv2
  import numpy
  import skimage
  from alibi_detect.utils.data import Bunch
  from alibi_detect.utils.discretizer import Discretizer
  from alibi_detect.utils.distance import abdm, multidim_scaling
  from alibi_detect.utils.mapping import ohe2ord
  from PIL import Image
  from scipy.ndimage import zoom
  from scipy.ndimage.interpolation import map_coordinates
  from skimage.filters import gaussian
label_desc: Use image node_id 12 for calling a global function with example usage: zoom_blur(x, max_zoom, step_zoom, xrange) and returns: np, x_z