code: def center_crop_resize_image(image, image_size):
      """Center-crop into a square and resize to image_size.
  
      Args:
        image: A 3-D image `Tensor`.
        image_size: int, Desired size. Crops the image to a square and resizes it
          to the requested size.
  
      Returns:
        A 4-D tensor of shape [1, image_size, image_size, 3] and dtype float32,
        with values in [0, 1].
      """
      shape = tf.shape(image)
      small_side = tf.minimum(shape[0], shape[1])
      image = tf.image.resize_image_with_crop_or_pad(
          image, small_side, small_side
      )
      image = tf.to_float(image) / 255.0
  
      image = tf.image.resize_images(
          image, tf.constant([image_size, image_size])
      )
  
      return tf.expand_dims(image, 0)
  
imports: import io
  import os
  import tempfile
  from magenta.models.image_stylization import imagenet_data
  import numpy
  import skimage.io
  import tensorflow.compat.v1
label_desc: Use image node_id 15 for calling a global function with example usage: center_crop_resize_image(image, image_size) and returns: tf