class_docstr: The widget that looks like an actual progress bar.
  
  It renders differently depending on whether the output supports Unicode or not:
      |███████   |  or
      [#######   ]
class_docstr_tok: ["The","widget","that","looks","like","an","actual","progress","bar",".","It","renders","differently","depending","on","whether","the","output","supports","Unicode","or","not",":","|\u2588\u2588\u2588\u2588\u2588\u2588\u2588","|","or","[","#","#","#","#","#","#","#","]"]
docstr: Render the widget.
docstr_tok: ["Render","the","widget","."]
code: def render(self, progress, width=None, status=None):
      """Render the widget."""
      if width <= 3:
          return RenderResult()
      bar_width = width - 2  # Total width minus the bar ends
  
      n_chars = int(progress * bar_width + 0.001)
      endf, endl = self._bar_ends
      if self._file_mode:
          out = endf
          out += self._bar_symbols[-1] * n_chars
          out += endl if progress == 1 else ""
          if status:
              out += " (%s)" % status
          next_progress = (n_chars + 1) / bar_width
          rendered_len = len(out)
      else:
          frac_chars = int(
              (progress * bar_width - n_chars) * len(self._bar_symbols)
          )
          out = endf
          out += self._bar_symbols[-1] * n_chars
          out += (
              self._bar_symbols[frac_chars - 1]
              if frac_chars > 0
              else ""
          )
          rendered_len = len(out)
          if status:
              out += " (%s)" % status
              rendered_len += 3 + len(status)
          out += " " * (width - 1 - rendered_len)
          out += endl
          next_progress = (
              n_chars + (frac_chars + 1) / len(self._bar_symbols)
          ) / bar_width
          rendered_len += max(0, width - 1 - rendered_len) + 1
      return RenderResult(
          rendered=out, length=rendered_len, next_progress=next_progress
      )
  
imports: from h2o.utils.compatibility import *
  import math
  import os
  import sys
  import time
  from types import FunctionType, GeneratorType, MethodType
  from h2o.utils.shared_utils import clamp
  from h2o.utils.typechecks import assert_is_type, is_type, numeric
label_desc: Use image node_id 2 for calling the PBWBar obj's underlying member method code with example usage: obj.render(progress, width, status) and returns: RenderResult, RenderResult