def process_need_nodes(app, doctree, fromdocname):
    """
    Event handler to add title meta data (status, tags, links, ...) information to the Need node.

    :param app:
    :param doctree:
    :param fromdocname:
    :return:
    """
    if not app.config.needs_include_needs:
        for node in doctree.traverse(Need):
            node.parent.remove(node)
        return

    env = app.builder.env

    # If no needs were defined, we do not need to do anything
    if not hasattr(env, "needs_all_needs"):
        return

    needs = env.needs_all_needs

    # Call dynamic functions and replace related note data with their return values
    resolve_dynamic_values(env)

    create_back_links(env)

    for node_need in doctree.traverse(Need):
        need_id = node_need.attributes["ids"][0]
        need_data = needs[need_id]

        find_and_replace_node_content(node_need, env, need_data)

        node_headline = construct_headline(need_data, app)
        node_meta = construct_meta(need_data, env)

        # Collapse check
        if need_data["collapse"] and "HTML" in app.builder.name.upper():
            # HEADER
            node_need_toogle_container = nodes.container(classes=['toggle'])
            node_need_toogle_head_container = nodes.container(classes=['header'])
            node_need_toogle_head_container += node_headline.children

            node_need_toogle_container.append(node_need_toogle_head_container)

            # Only add node_meta(line_block), if it has lines in it
            # Otherwise the pdf/latex build will claim about an empty line_block.
            if node_meta.children:
                node_need_toogle_container.append(node_meta)

            node_need.insert(0, node_need_toogle_container)
        else:
            node_meta.insert(0, node_headline)
            node_need.insert(0, node_meta)