docs: def process_needlist(app, doctree, fromdocname):
      """
      Replace all needlist nodes with a list of the collected needs.
      Augment each need with a backlink to the original location.
      """
      env = app.builder.env
  
      for node in doctree.traverse(Needlist):
          if not app.config.needs_include_needs:
              # Ok, this is really dirty.
              # If we replace a node, docutils checks, if it will not lose any attributes.
              # But this is here the case, because we are using the attribute "ids" of a node.
              # However, I do not understand, why losing an attribute is such a big deal, so we delete everything
              # before docutils claims about it.
              for att in ('ids', 'names', 'classes', 'dupnames'):
                  node[att] = []
              node.replace_self([])
              continue
  
          id = node.attributes["ids"][0]
          current_needfilter = env.need_all_needlists[id]
          all_needs = env.needs_all_needs
          content = []
          all_needs = list(all_needs.values())
  
          if current_needfilter["sort_by"] is not None:
              if current_needfilter["sort_by"] == "id":
                  all_needs = sorted(all_needs, key=lambda node: node["id"])
              elif current_needfilter["sort_by"] == "status":
                  all_needs = sorted(all_needs, key=status_sorter)
  
          found_needs = procces_filters(all_needs, current_needfilter)
  
          line_block = nodes.line_block()
          for need_info in found_needs:
              para = nodes.line()
              description = "%s: %s" % (need_info["id"], need_info["title"])
  
              if current_needfilter["show_status"] and need_info["status"] is not None:
                  description += " (%s)" % need_info["status"]
  
              if current_needfilter["show_tags"] and need_info["tags"] is not None:
                  description += " [%s]" % "; ".join(need_info["tags"])
  
              title = nodes.Text(description, description)
  
              # Create a reference
              if not need_info["hide"]:
                  ref = nodes.reference('', '')
                  ref['refdocname'] = need_info['docname']
                  ref['refuri'] = app.builder.get_relative_uri(
                      fromdocname, need_info['docname'])
                  ref['refuri'] += '#' + need_info['target_node']['refid']
                  ref.append(title)
                  para += ref
              else:
                  para += title
              line_block.append(para)
          content.append(line_block)
  
          if len(content) == 0:
              content.append(no_needs_found_paragraph())
  
          if current_needfilter["show_filters"]:
              content.append(used_filter_paragraph(current_needfilter))
  
          node.replace_self(content)