def __call__(self, index, total, percentage_step=<NUM_LIT:5>, logger='<STR_LIT>', log_level=logging.INFO,<EOL>reprint=False, time=True, length=<NUM_LIT:20>, fmt_string=None,  reset=False):
reset = (reset or<EOL>index <= self._current_index or<EOL>total != self._total)<EOL>if reset:<EOL><INDENT>self._reset(index, total, percentage_step, length)<EOL><DEDENT>statement = None<EOL>indexp1 = index + <NUM_LIT:1.0><EOL>next_interval = int(indexp1 / self._norm_factor)<EOL>ending = index >= self._total_minus_one<EOL>if next_interval > self._current_interval or ending or reset:<EOL><INDENT>if time:<EOL><INDENT>remaining_str = self._get_remaining(index)<EOL><DEDENT>else:<EOL><INDENT>remaining_str = '<STR_LIT>'<EOL><DEDENT>if ending:<EOL><INDENT>statement = '<STR_LIT:[>' + '<STR_LIT:=>' * self._length +'<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>bars = int((indexp1 / self._total) * self._length)<EOL>spaces = self._length - bars<EOL>percentage = indexp1 / self._total * <NUM_LIT><EOL>if reset:<EOL><INDENT>statement = ('<STR_LIT:[>' + '<STR_LIT:=>' * bars +<EOL>'<STR_LIT:U+0020>' * spaces + '<STR_LIT:]>' + '<STR_LIT>' % percentage + '<STR_LIT:%>')<EOL><DEDENT>else:<EOL><INDENT>statement = ('<STR_LIT:[>' + '<STR_LIT:=>' * bars +<EOL>'<STR_LIT:U+0020>' * spaces + '<STR_LIT:]>' + '<STR_LIT>' % percentage + '<STR_LIT:%>' +<EOL>remaining_str)<EOL><DEDENT><DEDENT>if fmt_string:<EOL><INDENT>statement = fmt_string % statement<EOL><DEDENT>if logger == '<STR_LIT>':<EOL><INDENT>if reprint:<EOL><INDENT>print('<STR_LIT:\r>' + statement, end='<STR_LIT>', flush=True)<EOL><DEDENT>else:<EOL><INDENT>print(statement)<EOL><DEDENT><DEDENT>elif logger is not None:<EOL><INDENT>if isinstance(logger, str):<EOL><INDENT>logger = logging.getLogger(logger)<EOL><DEDENT>logger.log(msg=statement, level=log_level)<EOL><DEDENT><DEDENT>self._current_interval = next_interval<EOL>self._current_index = index<EOL>return statement<EOL>
Plots a progress bar to the given `logger` for large for loops.

        To be used inside a for-loop at the end of the loop.

        :param index: Current index of for-loop
        :param total: Total size of for-loop
        :param percentage_step: Percentage step with which the bar should be updated
        :param logger:

            Logger to write to, if string 'print' is given, the print statement is
            used. Use None if you don't want to print or log the progressbar statement.

        :param log_level: Log level with which to log.
        :param reprint:

            If no new line should be plotted but carriage return (works only for printing)

        :param time: If the remaining time should be calculated and displayed
        :param length: Length of the bar in `=` signs.
        :param fmt_string:

            A string which contains exactly one `%s` in order to incorporate the progressbar.
            If such a string is given, ``fmt_string % progressbar`` is printed/logged.

        :param reset:

            If the progressbar should be restarted. If progressbar is called with a lower
            index than the one before, the progressbar is automatically restarted.

        :return:

            The progressbar string or None if the string has not been updated.