import hashlib


def calculate_md5sum(file_path):
    """Calculates the md5sum for a file.

    Args:
        file_path: `str`. The path to a local file.

    Returns:
        `str`: The md5sum.
    """
    m = hashlib.md5()
    with open(file_path, 'rb') as fh:
        m.update(fh.read())
    return m.hexdigest()