code: def _decode_and_random_crop(
      original_image, image_size, resize_method=None
  ):
      """Makes a random crop of image_size."""
      bbox = tf.constant(
          [0.0, 0.0, 1.0, 1.0], dtype=tf.float32, shape=[1, 1, 4]
      )
      image = _distorted_bounding_box_crop(
          original_image,
          bbox,
          min_object_covered=0.1,
          aspect_ratio_range=(3.0 / 4, 4.0 / 3.0),
          area_range=(0.08, 1.0),
          max_attempts=10,
      )
      original_shape = tf.shape(original_image)
      bad = _at_least_x_are_equal(original_shape, tf.shape(image), 3)
  
      image = tf.cond(
          bad,
          lambda: _decode_and_center_crop(original_image, image_size),
          lambda: _resize_image(image, image_size, resize_method),
      )
  
      return image
  
file_path: mediapipe/mediapipe/model_maker/python/vision/core/image_preprocessing.py
imports: import tensorflow
label_desc: Use image node_id 4 for calling a global function with example usage: _decode_and_random_crop(original_image, image_size, resize_method) and returns: image