def register_context_middleware(self, *middleware):
for m in middleware:<EOL><INDENT>if not is_generator(m):<EOL><INDENT>raise Exception('<STR_LIT>'.format(m))<EOL><DEDENT><DEDENT>self._middleware.extend(middleware)<EOL>
:param middleware: Middleware in order of execution