code: def random_crop(lq, hq, sf=4, lq_patchsize=64):
      h, w = lq.shape[:2]
      rnd_h = random.randint(0, h - lq_patchsize)
      rnd_w = random.randint(0, w - lq_patchsize)
      lq = lq[
          rnd_h : rnd_h + lq_patchsize, rnd_w : rnd_w + lq_patchsize, :
      ]
  
      rnd_h_H, rnd_w_H = int(rnd_h * sf), int(rnd_w * sf)
      hq = hq[
          rnd_h_H : rnd_h_H + lq_patchsize * sf,
          rnd_w_H : rnd_w_H + lq_patchsize * sf,
          :,
      ]
      return lq, hq
  
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 22 for calling a global function with example usage: random_crop(lq, hq, sf, lq_patchsize) and returns: lq,  hq