def turnstile_filter(global_conf, **local_conf):
<EOL>klass = TurnstileMiddleware<EOL>if '<STR_LIT>' in local_conf:<EOL><INDENT>klass = utils.find_entrypoint('<STR_LIT>',<EOL>local_conf['<STR_LIT>'], required=True)<EOL><DEDENT>def wrapper(app):<EOL><INDENT>return klass(app, local_conf)<EOL><DEDENT>return wrapper<EOL>
Factory function for turnstile.

Returns a function which, when passed the application, returns an
instance of the TurnstileMiddleware.