def write_history(defn, run_num, load, now):
    """Write a line to the history in definition.yaml."""
    history = defn.get("history", [])
    history.append(
        f"Ran {load}, run_num={run_num}, at {now.strftime('%Y-%m-%d %H:%M:%S')}"
    )
    defn["history"] = history
    return defn