async def _resolve_delta(delta: Delta) -> Delta:
    """Await all coroutines in the delta.

    Args:
        delta: The delta to process.

    Returns:
        The same delta dict with all coroutines resolved to their return value.
    """
    tasks = {}
    for state_name, state_delta in delta.items():
        for var_name, value in state_delta.items():
            if asyncio.iscoroutine(value):
                tasks[state_name, var_name] = asyncio.create_task(value)
    for (state_name, var_name), task in tasks.items():
        delta[state_name][var_name] = await task
    return delta
Await all coroutines in the delta.

    Args:
        delta: The delta to process.

    Returns:
        The same delta dict with all coroutines resolved to their return value.
    
reflex/state.py