def md5(path):
    assert os.path.isfile(path), 'Unable to perform md5 on {}'.format(path)
    with open(path, 'rb') as fp:
        md5 = hashlib.md5()
        while True:
            chunk = fp.read(16384)
            if (not chunk):
                break
            md5.update(chunk)
        return md5.hexdigest()
def md5(path):
    assert os.path.isfile(path), 'Unable to perform md5 on {}'.format(path)
    with open(path, 'rb') as fp:
        md5 = hashlib.md5()
        while True:
            chunk = fp.read(16384)
            if (not chunk):
                break
            md5.update(chunk)
        return md5.hexdigest()