code: def center_crop(size, image):
      """
      Perform center crop on input images.
      Args:
          size (int): size of the cropped height and width.
          image (array): the image to perform center crop.
      """
      height = image.shape[0]
      width = image.shape[1]
      y_offset = int(math.ceil((height - size) / 2))
      x_offset = int(math.ceil((width - size) / 2))
      cropped = image[
          y_offset : y_offset + size, x_offset : x_offset + size, :
      ]
      assert (
          cropped.shape[0] == size
      ), "Image height not cropped properly"
      assert (
          cropped.shape[1] == size
      ), "Image width not cropped properly"
      return cropped
  
imports: import math
  import numpy
  import cv2
label_desc: Use image node_id 17 for calling a global function with example usage: center_crop(size, image) and returns: cropped