def call(self, task: Task, llm_model: str = None):
        """
        Synchronous version of the call method that uses the async version internally.
        """
        import asyncio
        
        try:
            # Check if there's a running event loop
            loop = asyncio.get_running_loop()
            if loop.is_running():
                # If there's a running loop, run the coroutine in that loop
                return asyncio.run_coroutine_threadsafe(
                    self.call_async(task, llm_model), 
                    loop
                ).result()
        except RuntimeError:
            # No running event loop
            pass
        
        # If no running loop or exception occurred, create a new one
        return asyncio.run(self.call_async(task, llm_model))

        Synchronous version of the call method that uses the async version internally.
        
src/upsonic/client/level_two/agent.py