docs: def get_sections(need_info):
      """Gets the hierarchy of the section nodes as a list starting at the
      section of the current need and then its parent sections"""
      sections = []
      current_node = need_info['target_node']
      while current_node:
          if isinstance(current_node, nodes.section):
              title = current_node.children[0].astext()
              # If using auto-section numbering, then Sphinx inserts
              # multiple non-breaking space unicode characters into the title
              # we'll replace those with a simple space to make them easier to
              # use in filters
              title = NON_BREAKING_SPACE.sub(' ', title)
              sections.append(title)
          current_node = getattr(current_node, 'parent', None)
      return sections