def METHOD_NAME(self, serialized_example):
    """Parses a single tf.Example into image and label tensors."""
    # Dimensions of the images in the CIFAR-10 dataset.
    # See http://www.cs.toronto.edu/~kriz/cifar.html for a description of the
    # input format.
    features = tf.parse_single_example(
        serialized_example,
        features={
            "image": tf.FixedLenFeature([], tf.string),
            "label": tf.FixedLenFeature([], tf.int64),
        },
    )
    image = tf.decode_raw(features["image"], tf.uint8)
    image.set_shape([DEPTH * HEIGHT * WIDTH])
    # Reshape from [depth * height * width] to [depth, height, width].
    image = tf.cast(tf.transpose(tf.reshape(image, [DEPTH, HEIGHT, WIDTH]), [1, 2, 0]), tf.float32)
    label = tf.cast(features["label"], tf.int32)
    # Custom preprocessing.
    image = self.preprocess(image)
    return image, label