code: def _call_one_middleware(self, middleware):
          ''' Evaluate arguments and execute the middleware function '''
          args = {}
          for arg in middleware['args']:
              if hasattr(self, arg):
                  # same as eval() but safer for arbitrary code execution
                  args[arg] = reduce(getattr, arg.split('.'), self)
          self.logger.debug('calling middleware event {}'
                            .format(middleware['name']))
          middleware['call'](**argsf _call_one_middleware(self, middleware):
          ''' Evaluate arguments and execute the middleware function '''
          args = {}
          for arg in middleware['args']:
              if hasattr(self, arg):
                  # same as eval() but safer for arbitrary code execution
                  args[arg] = reduce(getattr, arg.split('.'), self)
          self.logger.debug('calling middleware event {}'
                            .format(middleware['name']))
          middleware['call'](**args)
docs: Evaluate arguments and execute the middleware function