def __init__(
        self,
        app,
        modules=[],
        injector=None,
        request_scope_class=RequestScope,
        use_annotations=None,
    ):
        if injector and use_annotations is not None:
            raise AssertionError(
                'You cannot set use_annotations and pass Injector instance '
                'at the same time',
            )
        if not injector:
            kwargs = {}
            if use_annotations is not None:
                kwargs['use_annotations'] = use_annotations
            injector = Injector(**kwargs)

        for module in (
                [FlaskModule(app=app, request_scope_class=request_scope_class)] +
                list(modules)):
            injector.binder.install(module)

        for container in (
                app.view_functions,
                app.before_request_funcs,
                app.after_request_funcs,
                app.teardown_request_funcs,
                app.template_context_processors,
                app.jinja_env.globals,
        ):
            process_dict(container, injector)

        process_error_handler_spec(app.error_handler_spec, injector)

        def reset_request_scope_before(*args, **kwargs):
            injector.get(request_scope_class).prepare()

        def reset_request_scope_after(*args, **kwargs):
            injector.get(request_scope_class).cleanup()

        app.before_request_funcs.setdefault(
            None, []).insert(0, reset_request_scope_before)
        app.teardown_request(reset_request_scope_after)

        self.injector = injector
        self.app = app
can be initialized from a list of objects, another SelectionSet, an MSelectionList, or an ObjectSet
dataset/ETHPy150Open alecthomas/flask_injector/flask_injector.py/FlaskInjector.__init__--crossover with--dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/pymel/core/nodetypes.py/SelectionSet.__init__