class_docstr: Thin wrapper around tqdm to handle soft imports.
class_docstr_tok: ["Thin","wrapper","around","tqdm","to","handle","soft","imports","."]
code: def update(self, i: int = 0, total: Optional[int] = None) -> None:
      if self._bar and (i != 0 or self._bar.total != total):
          self._progress += i
          if total is not None:
              self._bar.total = total
          if (
              self._bar.total is not None
              and self._progress > self._bar.total
          ):
              # If the progress goes over 100%, update the total.
              self._bar.total = self._progress
          self._bar.update(i)
  
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 5 for calling the ProgressBar obj's underlying member method code with example usage: obj.update(i, total) without return types