def METHOD_NAME(self):
    if not self.file.closed:
        if self.file.isatty():
            # ANSI Control Sequence EL does not work in Jupyter
            self.file.write("\r\033[K")
        else:
            fill = " " * self._cur_line_len
            self.file.write(f"\r{fill}\r")
        self._cur_line_len = 0