def METHOD_NAME() -> Dict[str, dict]:
    """For each directory under the NXDL root, create the content of an
    index file which link all NeXus class definition doc files.
    """
    indentation = " " * 4
    namespaces = {"nx": NXDL_NAMESPACE}
    sections = dict()
    root = directories.get_nxdl_root()
    for nxdl_file in iter_definitions():
        source = os.path.relpath(nxdl_file.parent, root)
        section = sections.get(source)
        if section is None:
            preample = _DIRNAME_TO_PREAMBLE.get(source)
            if preample is None:
                continue
            classes = []
            rst_lines = []
            index_file = directories.nxclass_build_root(nxdl_file) / "index.rst"
            sections[source] = {
                "index_file": index_file,
                "rst_lines": rst_lines,
                "classes": classes,
            }
            rst_lines.append(".. do NOT edit this file\n")
            rst_lines.append(f"   automatically generated by {__name__}\n")
            rst_lines.append("\n")
            rst_lines.append(preample)
            rst_lines.append("\n")
        else:
            classes = sections[source]["classes"]
            rst_lines = sections[source]["rst_lines"]
        nxclass_name = nxdl_file.with_suffix("").stem
        classes.append(nxclass_name)
        summary = get_nxclass_description(nxdl_file, namespaces)
        rst_lines.append("\n")
        rst_lines.append(f":ref:`{nxclass_name}`\n")
        rst_lines.append(f"{indentation}{summary}\n")
    # Create a table of content for each index file
    for section in sections.values():
        classes = section.pop("classes")
        rst_lines = section["rst_lines"]
        rst_lines.append("\n")
        rst_lines.append(".. toctree::\n")
        rst_lines.append(f"{indentation}:hidden:\n")
        rst_lines.append("\n")
        for cname in sorted(classes):
            rst_lines.append(f"{indentation}{cname}\n")
    return sections