def set_defaults(state): print("---- Setting defaults ----") if not state["audience"] or state["audience"] is None: state.update({"audience": "experts"}) sources_input = state["sources_input"] if "sources_input" in state else ["auto"] state.update({"sources_input": sources_input}) # if not state["sources_input"] or state["sources_input"] is None: # state.update({"sources_input": ["auto"]}) return state