docstr: Update the progress bar by advancing a specified number of
  steps, and optionally set the ``current_item`` for this new
  position.
  
  :param n_steps: Number of steps to advance.
  :param current_item: Optional item to set as ``current_item``
      for the updated position.
  
  .. versionchanged:: 8.0
      Added the ``current_item`` optional parameter.
  
  .. versionchanged:: 8.0
      Only render when the number of steps meets the
      ``update_min_steps`` threshold.
docstr_tok: ["Update","the","progress","bar","by","advancing","a","specified","number","of","steps",",","and","optionally","set","the","``","current_item","``","for","this","new","position",".",":","param","n_steps",":","Number","of","steps","to","advance",".",":","param","current_item",":","Optional","item","to","set","as","``","current_item","``","for","the","updated","position",".","..","versionchanged",":",":","8.0","Added","the","``","current_item","``","optional","parameter",".","..","versionchanged",":",":","8.0","Only","render","when","the","number","of","steps","meets","the","``","update_min_steps","``","threshold","."]
code: def update(
      self, n_steps: int, current_item: t.Optional[V] = None
  ) -> None:
      """Update the progress bar by advancing a specified number of
      steps, and optionally set the ``current_item`` for this new
      position.
  
      :param n_steps: Number of steps to advance.
      :param current_item: Optional item to set as ``current_item``
          for the updated position.
  
      .. versionchanged:: 8.0
          Added the ``current_item`` optional parameter.
  
      .. versionchanged:: 8.0
          Only render when the number of steps meets the
          ``update_min_steps`` threshold.
      """
      if current_item is not None:
          self.current_item = current_item
  
      self._completed_intervals += n_steps
  
      if self._completed_intervals >= self.update_min_steps:
          self.make_step(self._completed_intervals)
          self.render_progress()
          self._completed_intervals = 0
  
imports: import contextlib
  import math
  import os
  import sys
  import time
  import typing
  from gettext import gettext
  from io import StringIO
  from types import TracebackType
  from ._compat import _default_text_stdout
  from ._compat import CYGWIN
  from ._compat import get_best_encoding
  from ._compat import isatty
  from ._compat import open_stream
  from ._compat import strip_ansi
  from ._compat import term_len
  from ._compat import WIN
  from .exceptions import ClickException
  from .utils import echo
label_desc: Use image node_id 17 for calling the ProgressBar obj's underlying member method code with example usage: obj.update(n_steps, current_item) without return types