code: def run_task_external(self, coroutine):
          
  
          self.verify_calling_thread(False, 'run_task_external must not be called from the emulation thread')
  
          future = asyncio.run_coroutine_threadsafe(coroutine, self._loop)
          return future.result()
docs: Inject a task into the emulation loop and wait for it to finish.
  
          The coroutine parameter is run as a Task inside the EmulationLoop
          until it completes and the return value (or any raised Exception) is
          pased back into the caller's thread.
  
          Args:
              coroutine (coroutine): The task to inject into the event loop.
  
          Returns:
              object: Whatever the coroutine returned.