human
Here's a good function header given the following:
I wrote the below code

    def _build(app):
        pages = {}
        if app:
            apps = [app]
        else:
            apps = (frappe.local.flags.web_pages_apps or frappe.get_installed_apps())
        for app in apps:
            app_path = frappe.get_app_path(app)
            for start in get_start_folders():
                pages.update(get_pages_from_path(start, app, app_path))
        return pages
    return frappe.cache().get_value(u'website_pages', (lambda : _build(app)))

What's a good function header?
assistant
#Here's a good function header.

def get_pages(app=None):