def METHOD_NAME(plateName, plate, referenceImage):
    """Return a transformed version of the plate so that it matches the referenceImage"""
    # print "Enhance darker part of the image"
    plate = plate.point(lambda t: 2. * t - 256. * (t / 256.) ** 1.8)
    enhanceScaling = 32
    print "Enhance plate"
    plate = plate.resize((256, 256), Image.BICUBIC)
    plate.save("tmp/%s-full.jpg" % plateName, 'JPEG', quality=95)
    # referenceImage = referenceImage.resize(plate.size, Image.BILINEAR)
    referenceImage.save("tmp/%s-reference.jpg" % plateName, 'JPEG', quality=95)
    plate = None
    # referenceImage = None
    # os.system("python src/main.py --hi_res tmp/%s-full.jpg --lo_res tmp/%s-reference.jpg --output tmp/%s-enhanced.jpg" % (plateName, plateName, plateName) )
    referenceImage.save("tmp/%s-enhanced.jpg" % plateName, 'JPEG', quality=95)
    plate = Image.open("tmp/%s-enhanced.jpg" % plateName)
    plate = plate.resize((plate.size[0] * enhanceScaling, plate.size[0] * enhanceScaling), Image.BILINEAR)
    print "Done enhancing plate"
    return plate