def auto_injector(self):

    def decorator(method):
      if not inspect.isfunction(method):
        raise InjectionException('Injection works on function only')
      arg_names = inspect.getargspec(method).args
      injections = [arg for arg in arg_names if arg in self.bean_names]

      @wraps(method)
      def decorated_method(*args, **kwargs):
        return self.invoke_injected_method(method, injections, *args, **kwargs)

      deps = injections
      deps += getattr(method, '__injected_dependencies__', [])
      deps = list(set(deps))
      setattr(decorated_method, '__injected_dependencies__', deps)
      return decorated_method

    return decorator
Simple shortcut for start_write + write + end_write.
dataset/ETHPy150Open yegong/stock/utils/injection.py/ApplicationContextBuilder.auto_injector--crossover with--dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/jinja2/compiler.py/CodeGenerator.simple_write