code: def add_blur(img, sf=4):
      wd2 = 4.0 + sf
      wd = 2.0 + 0.2 * sf
      if random.random() < 0.5:
          l1 = wd2 * random.random()
          l2 = wd2 * random.random()
          k = anisotropic_Gaussian(
              ksize=2 * random.randint(2, 11) + 3,
              theta=random.random() * np.pi,
              l1=l1,
              l2=l2,
          )
      else:
          k = fspecial(
              "gaussian",
              2 * random.randint(2, 11) + 3,
              wd * random.random(),
          )
      img = ndimage.filters.convolve(
          img, np.expand_dims(k, axis=2), mode="mirror"
      )
  
      return img
  
imports: import random
  from functools import partial
  import albumentations
  import cv2
  import ldm.modules.image_degradation.utils_image
  import numpy
  import scipy
  import scipy.stats
  import torch
  from scipy import ndimage
  from scipy.interpolate import interp2d
  from scipy.linalg import orth
label_desc: Use image node_id 16 for calling a global function with example usage: add_blur(img, sf) and returns: img