import hashlib


def md5(file_path):
    """Calculate MD5 hash out of provided file

    Args:
        file_path (str): Path to the file to calculate MD5 out of

    Returns:
        string: A string containing HEX representation of calculated MD5 hash
    """
    hash_md5 = hashlib.md5()
    with open(file_path, "rb") as f:
        for data_chunk in iter(lambda: f.read(4096), b""):
            hash_md5.update(data_chunk)

    return hash_md5.hexdigest()