code: def get_function_definition_from_first_line(self):
          
          document = self.code_editor.document()
          cursor = QTextCursor(
              document.findBlockByLineNumber(self.line_number_cursor - 1))
  
          func_text = ''
          func_indent = ''
  
          is_first_line = True
          line_number = cursor.blockNumber() + 1
  
          number_of_lines = self.code_editor.blockCount()
          remain_lines = number_of_lines - line_number + 1
          number_of_lines_of_function = 0
  
          for __ in range(min(remain_lines, 20)):
              cur_text = to_text_string(cursor.block().text()).rstrip()
  
              if is_first_line:
                  if not is_start_of_function(cur_text):
                      return None
  
                  func_indent = get_indent(cur_text)
                  is_first_line = False
              else:
                  cur_indent = get_indent(cur_text)
                  if cur_indent <= func_indent:
                      return None
                  if is_start_of_function(cur_text):
                      return None
                  if cur_text.strip == '':
                      return None
  
              if cur_text[-1] == '\\':
                  cur_text = cur_text[:-1]
  
              func_text += cur_text
              number_of_lines_of_function += 1
  
              if cur_text.endswith(':'):
                  return func_text, number_of_lines_of_function
  
              cursor.movePosition(QTextCursor.NextBlock)
  
          return None
docs: Get func def when the cursor is located on the first def line.