import hashlib


def hash_md5(filename, chunk_size=2 ** 16):
    """
    Computes the *Message Digest 5 (MD5)* hash of given file.

    Parameters
    ----------
    filename : unicode
        File to compute the *MD5* hash of.
    chunk_size : int, optional
        Chunk size to read from the file.

    Returns
    -------
    unicode
        *MD5* hash of given file.
    """

    md5 = hashlib.md5()

    with open(filename, 'rb') as file_object:
        while True:
            chunk = file_object.read(chunk_size)
            if not chunk:
                break

            md5.update(chunk)

    return md5.hexdigest()