<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def saml_name_id_format_to_hash_type(name_format):
 """ Translate pySAML2 name format to satosa format :type name_format: str :rtype: satosa.internal_data.UserIdHashType :param name_format: SAML2 name format :return: satosa format """

    msg = "saml_name_id_format_to_hash_type is deprecated and will be removed."
    _warnings.warn(msg, DeprecationWarning)

    name_id_format_to_hash_type = {
        NAMEID_FORMAT_TRANSIENT: UserIdHashType.transient,
        NAMEID_FORMAT_PERSISTENT: UserIdHashType.persistent,
        NAMEID_FORMAT_EMAILADDRESS: UserIdHashType.emailaddress,
        NAMEID_FORMAT_UNSPECIFIED: UserIdHashType.unspecified,
    }

    return name_id_format_to_hash_type.get(
        name_format, UserIdHashType.transient
    )