def md5sum(filename):
_hash = md5()<EOL>with open(str(filename), "<STR_LIT:rb>") as f:<EOL><INDENT>for chunk in iter(lambda: f.read(<NUM_LIT> * _hash.block_size), b"<STR_LIT>"):<EOL><INDENT>_hash.update(chunk)<EOL><DEDENT><DEDENT>return _hash.hexdigest()<EOL>
Get a md5 checksum of a file

:param filename:
:return:

THis function is adapted from https://stackoverflow.com/a/24847608