code: def with_connection(func, self, *args, **argd):
      
      self.connection = self.get_connection()
      self.connection.last_used = time.time()
      self.connection.pre_call_hook(self, func)
      return func(self, *args, **argd)
docs: with_connection: decorator; make sure that there is a connection available
      for action. Set the connections 'last_used' attribute to current timestamp.
      We always get a fresh connection from the CONNECTION REGISTRY since the
      'extras' could have changed.