def error(self, msg, new_line=False):
        """This function prints already downloaded msg"""
        prefix = (
            "\033[2K\033[1G\r\r"
            + Fore.CYAN
            + Style.DIM
            + "["
            + Fore.RED
            + Style.BRIGHT
            + "-"
            + Fore.CYAN
            + Style.DIM
            + "] : "
        )
        if self._log_filepath:
            log.error(msg)
        if not new_line:
            msg = set_color(f"{msg}\n", level=40)
            string = prefix + msg
            sys.stdout.write(string)
            sys.stdout.flush()
        if new_line:
            msg = set_color(f"{msg}\n", level=40)
            string = "\n" + prefix + msg
            sys.stdout.write(string)
            sys.stdout.flush()
This function prints already downloaded msg
udemy/logger.py