def METHOD_NAME(event):
    inactive_state = "done"
    stages = copy.deepcopy(STAGES)
    for stage in STAGES:
        is_stage_active = inactive_state == "done" and in_stage(event, stage)
        if is_stage_active:
            inactive_state = "todo"
        stages[stage]["phase"] = "current" if is_stage_active else inactive_state
        for link in stages[stage].get("links", []):
            if "url" in link and link["url"]:
                link["url"] = build_event_url(event, link["url"])
    return stages