code: def preprocess_for_eval(
      image: tf.Tensor,
      image_size: int = IMAGE_SIZE,
      resize_method: str = tf.image.ResizeMethod.BILINEAR,
  ) -> tf.Tensor:
      """Preprocesses the given image for evaluation.
  
      Args:
        image: 4-D Tensor of shape [batch, height, width, channels] or 3-D Tensor of
          shape [height, width, channels].
        image_size: image size.
        resize_method: if None, use bicubic.
  
      Returns:
        A preprocessed image `Tensor`.
      """
      image = _decode_and_center_crop(image, image_size, resize_method)
      image = tf.reshape(image, [image_size, image_size, 3])
      image = tf.image.convert_image_dtype(image, dtype=tf.float32)
      return image
  
file_path: mediapipe/mediapipe/model_maker/python/vision/core/image_preprocessing.py
imports: import tensorflow
label_desc: Use image node_id 8 for calling a global function with example usage: preprocess_for_eval(image, image_size, resize_method) and returns: image