import hashlib


def md5(filename):
    """
    Creates the MD5 hash of a file.
    :param filename: the name of the file, a string
    """
    # Ensure that this script is not going to grab huge amounts of memory at once.
    block_size = 65536  # 64 KB.
    hash_function = hashlib.md5()
    with open(filename, 'rb') as f:
        buf = f.read(block_size)
        while len(buf) > 0:
            hash_function.update(buf)
            buf = f.read(block_size)
    return hash_function.hexdigest()