def get_sections(need_info):
sections = []<EOL>current_node = need_info['<STR_LIT>']<EOL>while current_node:<EOL><INDENT>if isinstance(current_node, nodes.section):<EOL><INDENT>title = current_node.children[<NUM_LIT:0>].astext()<EOL>title = NON_BREAKING_SPACE.sub('<STR_LIT:U+0020>', title)<EOL>sections.append(title)<EOL><DEDENT>current_node = getattr(current_node, '<STR_LIT>', None)<EOL><DEDENT>return sections<EOL>
Gets the hierarchy of the section nodes as a list starting at the
    section of the current need and then its parent sections