def METHOD_NAME(persisted_run: Run):  # noqa: F811
    persisted_run.future_state = FutureState.RESOLVED.value  # type: ignore
    persisted_run.resolved_at = datetime.now() - timedelta(days=1)
    persisted_run.started_at = persisted_run.resolved_at - timedelta(seconds=10)
    save_event_metrics(MetricEvent.run_state_changed, [persisted_run])
    aggregation = FuncSuccessRateMetric().aggregate(labels={}, group_by=[], rollup=None)
    assert aggregation == {
        SQLMetricsStorage.get_path(): MetricSeries(
            metric_name="sematic.func_success_rate",
            metric_type=MetricType.GAUGE.name,
            columns=[],
            series=[(1, ())],
        )
    }
    aggregation = FuncEffectiveRuntimeMetric().aggregate(
        labels={}, group_by=[], rollup=None
    )
    assert aggregation == {
        SQLMetricsStorage.get_path(): MetricSeries(
            metric_name="sematic.func_effective_runtime",
            metric_type=MetricType.GAUGE.name,
            columns=[],
            series=[(10, ())],
        )
    }