async def METHOD_NAME(
    config_handler: ConfigHandler, core_config_handler_started: CoreConfigHandler
) -> None:
    # make sure usage metrics are enabled
    core_config_handler_started.config.runtime.usage_metrics = True
    await config_handler.patch_config(
        ConfigEntity(ResotoCoreConfigId, {ResotoCoreRoot: {"runtime": {"usage_metrics": True}}})
    )
    # disable usage metrics
    await config_handler.patch_config(
        ConfigEntity(ResotoCoreConfigId, {ResotoCoreRoot: {"runtime": {"usage_metrics": False}}})
    )
    await asyncio.sleep(0.1)
    events: List[AnalyticsEvent] = core_config_handler_started.event_sender.events  # type: ignore # in-memory sender
    assert len(events) == 1
    assert events[0].kind == CoreEvent.UsageMetricsTurnedOff