code: def acquire(self):
          
          now = self.get_current_time()
          logger.debug("now: {}, len(actionsLog): {}".format(
              now, len(self.actionsLog)))
          self._trimActionsLog(now)
          logger.debug("after trim, len(actionsLog): {}".format(
              len(self.actionsLog)))
  
          if len(self.actionsLog) == 0:
              self.actionsLog.append(now)
              logger.debug("len(actionsLog) was 0, after append, len(actionsLog):"
                           " {}".format(len(self.actionsLog)))
              return True, 0.0
          timeToWaitAfterPreviousTry = self.delayFunction(len(self.actionsLog))
          timePassed = now - self.actionsLog[-1]
          logger.debug("timeToWaitAfterPreviousTry: {}, timePassed: {}".
                       format(timeToWaitAfterPreviousTry, timePassed))
          if timeToWaitAfterPreviousTry < timePassed:
              self.actionsLog.append(now)
              logger.debug(
                  "timeToWaitAfterPreviousTry < timePassed was true, after "
                  "append, len(actionsLog): {}".format(len(self.actionsLog)))
              return True, 0.0
          else:
              logger.debug(
                  "timeToWaitAfterPreviousTry < timePassed was false, "
                  "len(actionsLog): {}".format(len(self.actionsLog)))
              return False, timeToWaitAfterPreviousTry - timePassed
docs: Acquires lock for action.
  
          :return: True and 0.0 if lock successfully acquired or False and number of seconds to wait before the next try