import hashlib


def get_file_md5(path):
    """
    Retrieves the md5sum of a file's contents.

    Args:
        path:   string path of the file to hash.

    Returns:
        string md5sum hash.
    """
    hash_md5 = hashlib.md5()
    with open(path, 'rb') as in_file:
        hash_md5.update(in_file.read())
    return hash_md5.hexdigest()