from typing import Dict user_states: Dict[str, str] = {} user_scenarios: Dict[str, str] = {} user_levels: Dict[str, str] = {} user_turns: Dict[str, int] = {} user_quiz_answer: Dict[str, str] = {} def get_state(user_id: str) -> str: return user_states.get(user_id, "NORMAL") def set_state(user_id: str, state: str): user_states[user_id] = state def get_scenario(user_id: str) -> str: return user_scenarios.get(user_id, "1") def set_scenario(user_id: str, scenario_key: str): user_scenarios[user_id] = scenario_key def get_level(user_id: str) -> str: return user_levels.get(user_id, "1") def set_level(user_id: str, level_key: str): user_levels[user_id] = level_key def get_turn(user_id: str) -> int: return user_turns.get(user_id, 0) def increment_turn(user_id: str): user_turns[user_id] = get_turn(user_id) + 1 def reset_turns(user_id: str): user_turns[user_id] = 0 def set_quiz_answer(user_id: str, answer: str): user_quiz_answer[user_id] = answer def get_quiz_answer(user_id: str) -> str: return user_quiz_answer.get(user_id, "")