<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def canCommit(self, prepare: Prepare) -> (bool, str):
 """ Return whether the specified PREPARE can proceed to the Commit step. Decision criteria: - If this replica has got just n-f-1 PREPARE requests then commit request. - If less than n-f-1 PREPARE requests then probably there's no consensus on the request; don't commit - If more than n-f-1 then already sent COMMIT; don't commit :param prepare: the PREPARE """

        quorum = self.quorums.prepare.value
        if not self.prepares.hasQuorum(prepare, quorum):
            return False, 'does not have prepare quorum for {}'.format(prepare)
        if self.hasCommitted(prepare):
            return False, 'has already sent COMMIT for {}'.format(prepare)
        return True, ''