code: def __init__(
      self,
      iterable: t.Optional[t.Iterable[V]],
      length: t.Optional[int] = None,
      fill_char: str = "#",
      empty_char: str = " ",
      bar_template: str = "%(bar)s",
      info_sep: str = "  ",
      show_eta: bool = True,
      show_percent: t.Optional[bool] = None,
      show_pos: bool = False,
      item_show_func: t.Optional[
          t.Callable[[t.Optional[V]], t.Optional[str]]
      ] = None,
      label: t.Optional[str] = None,
      file: t.Optional[t.TextIO] = None,
      color: t.Optional[bool] = None,
      update_min_steps: int = 1,
      width: int = 30,
  ) -> None:
      self.fill_char = fill_char
      self.empty_char = empty_char
      self.bar_template = bar_template
      self.info_sep = info_sep
      self.show_eta = show_eta
      self.show_percent = show_percent
      self.show_pos = show_pos
      self.item_show_func = item_show_func
      self.label: str = label or ""
  
      if file is None:
          file = _default_text_stdout()
  
          # There are no standard streams attached to write to. For example,
          # pythonw on Windows.
          if file is None:
              file = StringIO()
  
      self.file = file
      self.color = color
      self.update_min_steps = update_min_steps
      self._completed_intervals = 0
      self.width: int = width
      self.autowidth: bool = width == 0
  
      if length is None:
          from operator import length_hint
  
          length = length_hint(iterable, -1)
  
          if length == -1:
              length = None
      if iterable is None:
          if length is None:
              raise TypeError("iterable or length is required")
          iterable = t.cast(t.Iterable[V], range(length))
      self.iter: t.Iterable[V] = iter(iterable)
      self.length = length
      self.pos = 0
      self.avg: t.List[float] = []
      self.last_eta: float
      self.start: float
      self.start = self.last_eta = time.time()
      self.eta_known: bool = False
      self.finished: bool = False
      self.max_width: t.Optional[int] = None
      self.entered: bool = False
      self.current_item: t.Optional[V] = None
      self.is_hidden: bool = not isatty(self.file)
      self._last_line: t.Optional[str] = None
  
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 1 to create a new ProgressBar object from inherited base classes: t.Generic with example: obj = ProgressBar(iterable, length, fill_char, empty_char, bar_template, info_sep, show_eta, show_percent, show_pos, item_show_func, label, file, color, update_min_steps, width)