How to populate a menu using "path_menu"? There is an option in class bpy.types.Menu(bpy_struct) called path_menu which says it can be used to "Populate a menu from a list of paths."

I'd like to use this to populate a menu from a folder of text files. I can't find any examples of how to do this though. Could someone point me to a menu example that uses path_menu or demonstrate how I can use this? Thanks.
Ok. Seems there's a pretty straight forward example in space_text.py

class TEXT_MT_templates_py(Menu):
    bl_label = "Python"

    def draw(self, context):
        self.path_menu(
            bpy.utils.script_paths("templates_py"),
            "text.open",
            props_default={"internal": True},
        )


path_menu can be used within the main draw function. Would be great if I could figure out how to make the contents of self.path_menu a sub menu item (rather then enumerating out directly into the menu).

EDIT: Just to be clear, I mean "would be great if I could" create a sub menu from the path_menu contents directly within the original menu itself (without having to create a whole separate, other class menu to call on).