import hashlib


def create_checksum(filename):
    """
    Calculates hash of the file

    Args:
        filename (str): path to the dataset file
    
    Returns:
        returns the checksum

    """
    # https://docs.python.org/3/library/hashlib.html#hash-algorithms
    hash = hashlib.md5()
    with open(filename, "rb") as fh:
        for chunk in iter(lambda: fh.read(8192), b""):
            hash.update(chunk)
    return hash.hexdigest()