code: def classical_degradation(x, k, sf=3):
      """blur + downsampling
      Args:
          x: HxWxC image, [0, 1]/[0, 255]
          k: hxw, double
          sf: down-scale factor
      Return:
          downsampled LR image
      """
      x = ndimage.convolve(x, np.expand_dims(k, axis=2), mode="wrap")
      # x = filters.correlate(x, np.expand_dims(np.flip(k), axis=2))
      st = 0
      return x[st::sf, st::sf, ...]
  
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 14 for calling a global function with example usage: classical_degradation(x, k, sf) and returns: x