def METHOD_NAME(cls, output_dir, class_path, base_path=None, children_paths=None):
    with open(os.path.join(output_dir, "%s.rst" % class_path), "w") as doc:
        class_name = class_path.split(".")[-1]
        doc.write("%s\n" % class_name)
        doc.write("=" * len(class_name))
        doc.write("\n\n")
        doc.write(".. autoclass:: %s\n" % class_path)
        doc.write("    :members:\n")
        doc.write("    :undoc-members:\n")
        doc.write("    :inherited-members:\n")
        if base_path:
            doc.write("\n    **Inherits from:** :class:`%s`\n" % base_path)
        if children_paths:
            doc.write("\n    **Extended by:**\n\n")
            for path in children_paths:
                doc.write("    - :class:`%s`\n" % path)
        def _list_members(category, predicate):
            names = [
                name
                for name, _ in inspect.getmembers(cls, predicate=predicate)
                if not name.startswith("_")
            ]
            if names:
                doc.write("\n    **%s:**\n\n" % category)
                for name in names:
                    doc.write("    - :obj:`~%s.%s`\n" % (class_path, name))
        _list_members("Attributes", lambda member: isinstance(member, property))
        _list_members("Methods", lambda member: inspect.isroutine(member))