def _call_next(self, handler_chain):

        def wrapped(*args, **kwargs):
            if len(handler_chain) == 1:
                return handler_chain[0](*args, **kwargs)
            else:
                return handler_chain[0](self._call_next(handler_chain[1:]),
                                        *args, **kwargs)

        return wrapped
Regression test: ensure no exceptions are raised when accessing
dataset/ETHPy150Open ColtonProvias/sqlalchemy-jsonapi/sqlalchemy_jsonapi/flaskext.py/FlaskJSONAPI._call_next--crossover with--dataset/ETHPy150Open swcarpentry/amy/workshops/test/test_event.py/TestEventImport.test_no_exception_when_empty_url