from agent.agent_graph.StateTasks import * def is_question_clear(state:ProblemState): # not check type , only check to do list is_clear = True # as used with and later is_clear = is_clear and ("question" in state.keys()) is_clear = is_clear and ("question_type" in state.keys()) and (state.get("question_type") in task_steps.keys()) if "question_type" in state.keys(): for step in task_steps[state.get("question_type")]: is_clear = is_clear and (step in state.keys()) is_clear = is_clear and (state["all_ok"]==True) return is_clear