from policy.engine import PolicyEngine policy = PolicyEngine() def report_execution(node, action, success, duration, temp_before, temp_after): thermal_spike = (temp_after - temp_before) > 0.15 policy.update_reputation( node, success, duration, thermal_spike )