def _handlereject(self, msg, prc):
        if self.debug: self.logger.write("State", "Handling the reject.")
        if msg.ballotnumber[BALLOTEPOCH] == self.ballotnumber[BALLOTEPOCH]:
            if self.debug: self.logger.write("State", "Updating ballotnumber and retrying.")
            # update the ballot number
            self.update_ballotnumber(msg.ballotnumber)
            # remove the proposal from proposals
            try:
                self.remove_from_proposals(prc.commandnumber)
            except KeyError:
                if self.debug: self.logger.write("State", "Proposal already removed.")
            self.pick_commandnumber_add_to_pending(prc.proposal)
            leader_causing_reject = self.detect_colliding_leader(msg.ballotnumber)
            if leader_causing_reject < self.me:
                # if caller lost to a replica whose name precedes its, back off more
                self.backoff += BACKOFFINCREASE
            if self.debug: self.logger.write("Paxos State",
                                             "There is another leader: %s" % \
                                                 str(leader_causing_reject))
            time.sleep(self.backoff)
            self.issue_pending_commands()

        # if the epoch is wrong, should collect the state and start from beginning
        else:
            if self.debug: self.logger.write("State", "In wrong EPOCH.")
            self._rejoin()
dataset/ETHPy150Open denizalti/concoord/concoord/replica.py/Replica._handlereject/original