(outline, hierarchy=1)
| 1929 | return labeled_elements |
| 1930 | |
| 1931 | def get_hierarchy(outline, hierarchy=1): |
| 1932 | name_to_hierarchy = {} |
| 1933 | for key, section in outline.items(): |
| 1934 | if key == "meta": |
| 1935 | continue |
| 1936 | name_to_hierarchy[section['name']] = hierarchy |
| 1937 | if 'subsections' in section: |
| 1938 | name_to_hierarchy.update(get_hierarchy(section['subsections'], hierarchy+1)) |
| 1939 | return name_to_hierarchy |
| 1940 | |
| 1941 | def get_hierarchy_by_keys(outline, hierarchy=1): |
| 1942 | name_to_hierarchy = {} |
no outgoing calls
no test coverage detected