import hashlib


def get_file_md5(filename):
    """Returns the MD5 hash of the given file.
    """
    block_size = 65536
    hasher = hashlib.md5()
    with open(filename, 'rb') as f:
        buf = f.read(block_size)
        while len(buf) > 0:
            hasher.update(buf)
            buf = f.read(block_size)
    return hasher.hexdigest()