def run_coroutine_in_new_thread(coro):
    """
    Run a coroutine in a new thread with a new event loop.
    This is useful when we're in an async context but need a synchronous result.
    
    Args:
        coro: The coroutine to run
        
    Returns:
        The result of the coroutine
    """
    def run_coro_in_thread(coro):
        loop = asyncio.new_event_loop()
        asyncio.set_event_loop(loop)
        try:
            return loop.run_until_complete(coro)
        finally:
            loop.close()
    
    with concurrent.futures.ThreadPoolExecutor(max_workers=1) as executor:
        return executor.submit(run_coro_in_thread, coro).result()

    Run a coroutine in a new thread with a new event loop.
    This is useful when we're in an async context but need a synchronous result.
    
    Args:
        coro: The coroutine to run
        
    Returns:
        The result of the coroutine
    
src/upsonic/client/base.py