code: def insert_line_above(self, copy_margin=True):
          
          if copy_margin:
              insert = self.document.leading_whitespace_in_current_line + '\n'
          else:
              insert = '\n'
  
          self.cursor_position += self.document.get_start_of_line_position()
          self.insert_text(insert)
          self.cursor_position -= 1
docs: Insert a new line above the current one.