code: def get_thumbnail(
      image: np.ndarray, range: int = 2000, max_size: int = 1000
  ) -> np.ndarray:
      h, w = image.shape[:2]
      if h >= range or w >= range:
          if h >= w:
              image = cv2.resize(
                  image, (int(max_size / h * w), max_size)
              )
          else:
              image = cv2.resize(
                  image, (max_size, int(max_size / w * h))
              )
      return image
  
imports: import numpy
  import cv2
  from skimage import exposure
label_desc: Use image node_id 3 for calling a global function with example usage: get_thumbnail(image, range, max_size) and returns: image