import hashlib


def md5sum(filepath):
    """Calculate md5_sum

    Args:
       filepath (string):  path to the file

    Returns:
       string - digest value as a string of hexadecimal digits
    """
    md5 = hashlib.md5()
    with open(filepath, "rb") as f:
        for chunk in iter(lambda: f.read(8192), b""):
            md5.update(chunk)
    return md5.hexdigest()