def make_local_image( embedded_cid , filename, payload):
    """helper func that creates an image object. others may replace this with a specific solution. 
    the important point is that it returns a link 

    """
    import models #my models module. you will probably replace this entire function with your own code
    image_model = models.EmbeddedImageModel(filename=filename,
                                            data = payload)
    image_model.put()
    return image_model.link
helper func that creates an image object. others may replace this with a specific solution. 
    the important point is that it returns a link 

    
recipes/Python/578058_handling_embedded_email_images/recipe-578058.py