<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save_state(internal_request, state):
 """ Saves all necessary information needed by the UserIdHasher :type internal_request: satosa.internal_data.InternalRequest :param internal_request: The request :param state: The current state """

        state_data = {"hash_type": internal_request.user_id_hash_type}
        state[UserIdHasher.STATE_KEY] = state_data