code: def modcrop_np(img, sf):
      """
      Args:
          img: numpy image, WxH or WxHxC
          sf: scale factor
      Return:
          cropped image
      """
      w, h = img.shape[:2]
      im = np.copy(img)
      return im[: w - w % sf, : h - h % sf, ...]
  
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 1 for calling a global function with example usage: modcrop_np(img, sf) and returns: im