class_docstr: A progress bar made with rich.
  
  Example:
      .. highlight:: python
      .. code-block:: python
  
          with ProgressBar(100, 'loop') as p_bar:
              for i in range(100):
                  do_busy()
                  p_bar.update()
class_docstr_tok: ["A","progress","bar","made","with","rich",".","Example",":","..","highlight",":",":","python","..","code-block",":",":","python","with","ProgressBar","(","100",",","'loop","'",")","as","p_bar",":","for","i","in","range","(","100",")",":","do_busy","(",")","p_bar.update","(",")"]
docstr: Update the progress bar
  
  :param task_id: the task to update
  :param advance: Add a value to main task.completed
  
  
  .. # noqa: DAR202
  .. # noqa: DAR101
  .. # noqa: DAR003
docstr_tok: ["Update","the","progress","bar",":","param","task_id",":","the","task","to","update",":","param","advance",":","Add","a","value","to","main","task.completed","..","#","noqa",":","DAR202","..","#","noqa",":","DAR101","..","#","noqa",":","DAR003"]
code: def update(
      self,
      task_id: Optional[TaskID] = None,
      advance: float = 1,
      *args,
      **kwargs,
  ):
      """Update the progress bar
  
      :param task_id: the task to update
      :param advance: Add a value to main task.completed
  
  
      .. # noqa: DAR202
      .. # noqa: DAR101
      .. # noqa: DAR003
      """
      if not task_id:
          super().update(self.task_id, advance=advance, *args, **kwargs)
      else:
          super().update(task_id, advance=advance, *args, **kwargs)
  
imports: import time
  import typing
  from functools import wraps
  from typing import Optional, Union, Callable
  from jina.constants import __windows__
  from jina.helper import get_readable_size, get_readable_time, colored, get_rich_console
  from rich.progress import Progress, Task, BarColumn, TimeRemainingColumn, SpinnerColumn, TimeElapsedColumn, TextColumn, ProgressColumn, TaskID
  from rich.text import Text
  from rich.table import Column
  from rich.console import Console
label_desc: Use image node_id 2 for calling the ProgressBar obj's underlying member method code with example usage: obj.update(task_id, advance) without return types