def METHOD_NAME(m):
    lines = []
    lines.extend(
        [
            ".. note::",
            "   moz.build files' implementation includes a ``Path`` class.",
        ]
    )
    path_docstring_minus_summary = prepare_docstring(m.Path.__doc__)[2:]
    lines.extend(["   " + line for line in path_docstring_minus_summary])
    for subcontext, cls in sorted(m.SUBCONTEXTS.items()):
        lines.extend(
            [
                ".. _mozbuild_subcontext_%s:" % subcontext,
                "",
                "Sub-Context: %s" % subcontext,
                "=============" + "=" * len(subcontext),
                "",
            ]
        )
        lines.extend(prepare_docstring(cls.__doc__))
        if lines[-1]:
            lines.append("")
        for k, v in sorted(cls.VARIABLES.items()):
            lines.extend(variable_reference(k, *v))
    lines.extend(
        [
            "Variables",
            "=========",
            "",
        ]
    )
    for v in sorted(m.VARIABLES):
        lines.extend(variable_reference(v, *m.VARIABLES[v]))
    lines.extend(
        [
            "Functions",
            "=========",
            "",
        ]
    )
    for func in sorted(m.FUNCTIONS):
        lines.extend(function_reference(func, *m.FUNCTIONS[func]))
    lines.extend(
        [
            "Special Variables",
            "=================",
            "",
        ]
    )
    for v in sorted(m.SPECIAL_VARIABLES):
        lines.extend(special_reference(v, *m.SPECIAL_VARIABLES[v]))
    return lines