<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(self, *args, **kwargs):
 """Print inside of the spinner context. This must be used when inside of a spinner context to ensure that the line printed doesn't overwrite an already existing spinner line. """

        clear_len = max(len(self._prev_msg), len(self.msg)) + 4
        self.spinner.stream.write("%s\r" % (' ' * clear_len))
        print(*args, file=self.spinner.stream, flush=True, **kwargs)