class_docstr: Local thread for managing async tasks related to RemoteExpert
code: def run_coroutine(cls, coro: Awaitable, return_future: bool = False):
      if cls._event_thread is None or cls._pid != os.getpid():
          cls._pid = os.getpid()
          cls._event_loop_fut = Future()
          cls._event_thread = Thread(
              target=cls._run_event_loop, daemon=True
          )
          cls._event_thread.start()
  
      loop = cls._event_loop_fut.result()
      future = asyncio.run_coroutine_threadsafe(coro, loop)
      return future if return_future else future.result()
  
file_path: hivemind/hivemind/moe/client/remote_expert_worker.py
imports: import asyncio
  import os
  from concurrent.futures import Future
  from threading import Thread
  from typing import Awaitable, Optional
  from hivemind.utils import switch_to_uvloop
label_desc: Use image node_id 2 for calling the RemoteExpertWorker obj's underlying member method code with example usage: obj.run_coroutine(cls, coro, return_future) and returns: unknown