import hashlib


def calculate_checksum(dest_path: str):
    """
    Calculate image checksum.
    :param dest_path: Path to the image.
    :return: MD5 checksum
    """
    with open(dest_path, "rb") as file_to_check:
        img_data = file_to_check.read()
        md5_returned = hashlib.md5(img_data).hexdigest()
    return md5_returned