import hashlib


def compare_images(image1, image2):
    """Compares byte strings of two images by hashing them with md5
    if hashes are the same - return true
    if not return false.
    This is used primarily for checking if issues are missing a unique cover
    image from TFAW.
    """
    hash1 = hashlib.md5(image1).hexdigest()
    hash2 = hashlib.md5(image2).hexdigest()
    return hash1 == hash2