def render_progress(self):
        from .termui import get_terminal_size
        nl = False

        if self.is_hidden:
            buf = [self.label]
            nl = True
        else:
            buf = []
            # Update width in case the terminal has been resized
            if self.autowidth:
                old_width = self.width
                self.width = 0
                clutter_length = term_len(self.format_progress_line())
                new_width = max(0, get_terminal_size()[0] - clutter_length)
                if new_width < old_width:
                    buf.append(BEFORE_BAR)
                    buf.append(' ' * self.max_width)
                    self.max_width = new_width
                self.width = new_width

            clear_width = self.width
            if self.max_width is not None:
                clear_width = self.max_width

            buf.append(BEFORE_BAR)
            line = self.format_progress_line()
            line_len = term_len(line)
            if self.max_width is None or line_len < self.max_width:
                self.max_width = line_len
            buf.append(line)

            buf.append(' ' * (clear_width - line_len))
        line = ''.join(buf)

        # Render the line only if it changed.
        if line != self._last_line:
            self._last_line = line
            echo(line, file=self.file, color=self.color, nl=nl)
            self.file.flush()
dataset/ETHPy150Open pallets/click/click/_termui_impl.py/ProgressBar.render_progress/swapped operands of `<`