<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def print_exception(self, msg):
 """ Print exceptions happening in separate threads Prevent from logging a ton of them if a potentially big number of them fail the same way """

        if self.exception_printed < 10:
            self.log.error(msg)
            self.exception_printed += 1