def timing(msg: str):
    """Create a context manager to time a block of code.

    Args:
        msg: The message to display.

    Yields:
        None.
    """
    start = time.time()
    try:
        yield
    finally:
        debug(f"[white]\\[timing] {msg}: {time.time() - start:.2f}s[/white]")
Create a context manager to time a block of code.

    Args:
        msg: The message to display.

    Yields:
        None.
    
reflex/utils/console.py