code: def print(self, *args, **kwargs):
          
          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)
docs: 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.