code: def wait(self, promise, timeout=None):
      # type: (Promise, Optional[float]) -> None
      if not promise.is_pending:
          # We return if the promise is already
          # fulfilled or rejected
          return
  
      target = promise._target()
  
      if self.trampoline_enabled:
          if self.is_tick_used:
              self.drain_queue_until_resolved(target)
  
          if not promise.is_pending:
              # We return if the promise is already
              # fulfilled or rejected
              return
      target.scheduler.wait(target, timeout)
  
imports: from collections import deque
  from threading import local
label_desc: Use image node_id 14 for calling the Async obj's underlying member method code with example usage: obj.wait(promise, timeout) without return types