code: def tryCommit(self, prepare: Prepare):
          
          rv, reason = self.canCommit(prepare)
          if rv:
              self.doCommit(prepare)
          else:
              self.logger.debug("{} cannot send COMMIT since {}".format(self, reason))
docs: Try to commit if the Prepare message is ready to be passed into the
          commit phase.