code: def get_cursor_up_position(self, count=1, preferred_column=None):
          
          assert count >= 1
          column = self.cursor_position_col if preferred_column is None else preferred_column
  
          return self.translate_row_col_to_index(
              max(0, self.cursor_position_row - count), column) - self.cursor_position
docs: Return the relative cursor position (character index) where we would be if the
          user pressed the arrow-up button.
  
          :param preferred_column: When given, go to this column instead of
                                   staying at the current column.