org-get-previous-line-level
org-get-previous-line-level is a compiled Lisp function in `org.el
'.
(org-get-previous-line-level)
Return the outline depth of the last headline before the current line.
Returns 0 for the first headline in the buffer, and nil if before the
first headline.