code: def drain_queue(self, queue):
      # type: (deque) -> None
      from .promise import Promise
  
      while queue:
          fn = queue.popleft()
          if isinstance(fn, Promise):
              fn._settle_promises()
              continue
          fn()
  
imports: from collections import deque
  from threading import local
label_desc: Use image node_id 12 for calling the Async obj's underlying member method code with example usage: obj.drain_queue(queue) without return types