code: def iterate_promise(promise):
      # type: (Promise) -> Iterator
      if not promise.is_fulfilled:
          yield from promise.future  # type: ignore
      assert promise.is_fulfilled
      return promise.get()
  
label_desc: Use image node_id 1 for calling a global function with example usage: iterate_promise(promise) and returns: promise