import hashlib


def get_md5_hash(filepath, blocksize=1024 * 1024):
    """Get MD5 hash of input file."""
    m5 = hashlib.md5()
    with open(filepath, 'rb') as f:
        chunk = f.read(blocksize)
        while chunk:
            m5.update(chunk)
            chunk = f.read(blocksize)
    return m5.hexdigest()