<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_str(self, string):
 """Print a string at the virtual cursor. Handles special characters such as '\\n' and '\\r'. Printing past the bottom of the console will scroll everything upwards if :any:`set_mode` is set to 'scroll'. Colors can be set with :any:`set_colors` and the virtual cursor can be moved with :any:`move`. Args: string (Text):
 The text to print. .. seealso:: :any:`draw_str`, :any:`move`, :any:`set_colors`, :any:`set_mode`, :any:`write`, :any:`Window` """

        x, y = self._cursor
        for char in string:
            if char == '\n': # line break
                x = 0
                y += 1
                continue
            if char == '\r': # return
                x = 0
                continue
            x, y = self._normalizeCursor(x, y)
            self.draw_char(x, y, char, self._fg, self._bg)
            x += 1
        self._cursor = (x, y)