'"Upload a valid image. The file you uploaded was either not an image or a corrupted image."' for 'invalid_image'. define the method to_python with arguments self and data.
def to_python ( self , data ) :