class_docstr: Thin wrapper around tqdm to handle soft imports.
class_docstr_tok: ["Thin","wrapper","around","tqdm","to","handle","soft","imports","."]
code: def fetch_until_complete(self, refs: List[ObjectRef]) -> List[Any]:
      ref_to_result = {}
      remaining = refs
      t = threading.current_thread()
      # Triggering fetch_local redundantly for the same object is slower.
      # We only need to trigger the fetch_local once for each object,
      # raylet will persist these fetch requests even after ray.wait returns.
      # See https://github.com/ray-project/ray/issues/30375.
      fetch_local = True
      while remaining:
          done, remaining = ray.wait(
              remaining, fetch_local=fetch_local, timeout=0.1
          )
          if fetch_local:
              fetch_local = False
          for ref, result in zip(done, ray.get(done)):
              ref_to_result[ref] = result
          self.update(len(done))
  
          with _canceled_threads_lock:
              if t in _canceled_threads:
                  break
  
      return [ref_to_result[ref] for ref in refs]
  
file_path: ray/python/ray/data/_internal/progress_bar.py
imports: import threading
  from typing import Any, List, Optional
  import ray
  from ray.experimental import tqdm_ray
  from ray.types import ObjectRef
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 3 for calling the ProgressBar obj's underlying member method code with example usage: obj.fetch_until_complete(refs) and returns: unknown