code: def _iterate(self, values):
      # type: (Collection[Any]) -> None
      Promise = self._promise_class
      is_resolved = False
  
      self._length = len(values)
      self._values = [None] * self._length
  
      result = self.promise
  
      for i, val in enumerate(values):
          if Promise.is_thenable(val):
              maybe_promise = Promise._try_convert_to_promise(
                  val
              )._target()
              # if is_resolved:
              #     # maybe_promise.suppressUnhandledRejections
              #     pass
              if maybe_promise.is_pending:
                  maybe_promise._add_callbacks(
                      partial(self._promise_fulfilled, i=i),
                      self._promise_rejected,
                      None,
                  )
                  self._values[i] = maybe_promise
              elif maybe_promise.is_fulfilled:
                  is_resolved = self._promise_fulfilled(
                      maybe_promise._value(), i
                  )
              elif maybe_promise.is_rejected:
                  is_resolved = self._promise_rejected(
                      maybe_promise._reason()
                  )
  
          else:
              is_resolved = self._promise_fulfilled(val, i)
  
          if is_resolved:
              break
  
      if not is_resolved:
          result._is_async_guaranteed = True
  
file_path: wandb/wandb/vendor/promise-2.3.0/wandb_promise/promise_list.py
imports: from functools import partial
label_desc: Use image node_id 5 for calling the PromiseList obj's underlying member method code with example usage: obj._iterate(values) without return types