Python org-mode tree parser