code: def get_central_crop_longer():
      """Center crop the longer side so that the image becomes a square.
  
      Args:
  
      Returns:
        A function, that applies central crop.
      """
  
      def _crop(image):
          shape = tf.shape(image)
          h, w = shape[0], shape[1]
          crop_fn = tf.image.crop_to_bounding_box
          return tf.cond(
              h > w,
              lambda: crop_fn(image, h // 2 - w // 2, 0, w, w),
              lambda: crop_fn(image, 0, w // 2 - h // 2, h, h),
          )
  
      return _crop
  
imports: from typing import Optional, Tuple
  import numpy
  from scenic.dataset_lib.big_transfer.preprocessing import autoaugment
  from scenic.dataset_lib.big_transfer.preprocessing import utils
  from scenic.dataset_lib.big_transfer.registry import Registry
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_addons import image
label_desc: Use image node_id 17 for calling a global function with example usage: get_central_crop_longer() and returns: _crop, tf