def return_name(image_name):
    """Converts inverted image name to original name
    Inverted images are stored in the database under the image
    they're derived from. As such, to locate information
    corresponding to the inverted image, the database must
    be queried via the original image name.
    Args:
        image_name (str): inverted image name
    Returns:
        str: original image name
    """
    whole_stem, ext = image_name.split('.')
    stem, inv = whole_stem.split('_')
    image_name = stem + "." + ext
    return image_name