def METHOD_NAME(example):
    # Read example
    image_key = "image/encoded"
    label_key = "image/class/label"
    keys_to_features = {
        image_key: tf.io.FixedLenFeature((), tf.string, ""),
        label_key: tf.io.FixedLenFeature([], tf.int64, -1),
    }
    parsed = tf.io.parse_single_example(example, keys_to_features)
    # Decode and resize image
    image_bytes = tf.reshape(parsed[image_key], shape=[])
    image = tf.io.decode_jpeg(image_bytes, channels=3)
    if resizing:
        image = resizing(image)
    # Decode label
    label = (
        tf.cast(tf.reshape(parsed[label_key], shape=()), dtype=tf.int32) - 1
    )
    label = tf.one_hot(label, 1000)
    return image, label