code: def defocus_blur(
      x: np.ndarray,
      radius: int,
      alias_blur: float,
      xrange: tuple = None,
  ) -> np.ndarray:
      """
      Apply defocus blur.
  
      Parameters
      ----------
      x
          Instance to be perturbed.
      radius
          Radius for the Gaussian kernel.
      alias_blur
          Standard deviation for the Gaussian kernel in both X and Y directions.
      xrange
          Tuple with min and max data range.
  
      Returns
      -------
      Perturbed instance.
      """
      x, scale_back = scale_minmax(x, xrange)
      kernel = disk(radius=radius, alias_blur=alias_blur)
      channels = []
      for d in range(3):
          channels.append(cv2.filter2D(x[:, :, d], -1, kernel))
      x_db = np.array(channels).transpose((1, 2, 0))
      if scale_back:
          x_db = x_db * (xrange[1] - xrange[0]) + xrange[0]
      if isinstance(xrange, tuple):
          return np.clip(x_db, xrange[0], xrange[1])
      else:
          return x_db
  
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 15 for calling a global function with example usage: defocus_blur(x, radius, alias_blur, xrange) and returns: np, x_db