code: def clipped_zoom(x: np.ndarray, zoom_factor: float) -> np.ndarray:
      """
      Helper function for zoom blur.
  
      Parameters
      ----------
      x
          Instance to be perturbed.
      zoom_factor
          Zoom strength.
  
      Returns
      -------
      Cropped and zoomed instance.
      """
      h = x.shape[0]
      ch = int(
          np.ceil(h / float(zoom_factor))
      )  # ceil crop height(= crop width)
      top = (h - ch) // 2
      x = zoom(
          x[top : top + ch, top : top + ch],
          (zoom_factor, zoom_factor, 1),
          order=1,
      )
      trim_top = (x.shape[0] - h) // 2  # trim off any extra pixels
      return x[trim_top : trim_top + h, trim_top : trim_top + h]
  
imports: import random
  from io import BytesIO
  from typing import List, Tuple, Union
  import cv2
  import numpy
  import skimage
  from alibi_detect.utils.data import Bunch
  from alibi_detect.utils.discretizer import Discretizer
  from alibi_detect.utils.distance import abdm, multidim_scaling
  from alibi_detect.utils.mapping import ohe2ord
  from PIL import Image
  from scipy.ndimage import zoom
  from scipy.ndimage.interpolation import map_coordinates
  from skimage.filters import gaussian
label_desc: Use image node_id 11 for calling a global function with example usage: clipped_zoom(x, zoom_factor) and returns: x