'Set the cursor to a specific `line` and `column`.
Cursor is allowed to move out of the scrolling region only when
:data:`~pyte.modes.DECOM` is reset, otherwise -- the position
doesn\'t change.
:param int line: line number to move the cursor to.
:param int column: column number to move the cursor to.'

def cursor_position(self, line=None, column=None):

    column = ((column or 1) - 1)
    line = ((line or 1) - 1)
    if (mo.DECOM in self.mode):
        line += self.margins.top
        if (not (self.margins.top <= line <= self.margins.bottom)):
            return
    (self.cursor.x, self.cursor.y) = (column, line)
    self.ensure_bounds()
