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 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 8 for calling a global function with example usage: fspecial_gaussian(hsize, sigma) and returns: h