import hashlib


def file_to_md5(file_path):
    """
    Calculate the MD5 hash (message digest) of a file from a given file path.

    Args:
        file_path (string): The to the file to be hashed.

    Returns (string): The MD5 hash (message digest) of the specified file.
    """

    hasher = hashlib.md5()
    with open(file_path, 'rb') as file:
        buf = file.read()
        hasher.update(buf)

    return hasher.hexdigest()