code: def fspecial_gaussian(hsize, sigma):
      hsize = [hsize, hsize]
      siz = [(hsize[0] - 1.0) / 2.0, (hsize[1] - 1.0) / 2.0]
      std = sigma
      [x, y] = np.meshgrid(
          np.arange(-siz[1], siz[1] + 1), np.arange(-siz[0], siz[0] + 1)
      )
      arg = -(x * x + y * y) / (2 * std * std)
      h = np.exp(arg)
      h[h < scipy.finfo(float).eps * h.max()] = 0
      sumh = h.sum()
      if sumh != 0:
          h = h / sumh
      return h
  
imports: import numpy
  import cv2
  import torch
  from functools import partial
  import random
  from scipy import ndimage
  import scipy
  import scipy.stats
  from scipy.interpolate import interp2d
  from scipy.linalg import orth
  import albumentations
  import ldm.modules.image_degradation.utils_image
label_desc: Use image node_id 8 for calling a global function with example usage: fspecial_gaussian(hsize, sigma) and returns: h