def _smart_html_renderer(self, html_renderer):
        def wrapper(page):
            """Simple wrapper to inspect the HTML renderer function and pass
            arguments to it based on the number of arguments.

            * 1 argument -> page body
            * 2 arguments -> page body, flatpages instance
            * 3 arguments -> page body, flatpages instance, page instance
            """
            body = page.body

            try:
                args_length = len(getargspec(html_renderer).args)
            except TypeError:
                return html_renderer(body)

            if args_length == 1:
                return html_renderer(body)
            elif args_length == 2:
                return html_renderer(body, self)
            elif args_length == 3:
                return html_renderer(body, self, page)

            raise ValueError(
                'HTML renderer function {0!r} not supported by '
                'Flask-FlatPages, wrong number of arguments: {1}.'.
                format(html_renderer, args_length)
            )
        return wrapper
Returns the list of parameter names that are expected from the
dataset/ETHPy150Open SimonSapin/Flask-FlatPages/flask_flatpages/flatpages.py/FlatPages._smart_html_renderer--crossover with--dataset/ETHPy150Open zbyte64/django-hyperadmin/hyperadmin/filters.py/BaseFilter.expected_parameters