code: def receive_promise(self, msg):
          '''
          Returns an Accept messages if a quorum of Promise messages is achieved
          '''
          self.observe_proposal(msg.proposal_id)
  
          if not self.leader and msg.proposal_id == self.proposal_id and msg.from_uid not in self.promises_received:
  
              self.promises_received.add(msg.from_uid)
  
              if self.highest_accepted_id is None or msg.last_accepted_id > self.highest_accepted_id:
                  self.highest_accepted_id = msg.last_accepted_id
                  if msg.last_accepted_value is not None:
                      self.proposed_value = msg.last_accepted_value
  
              if len(self.promises_received) == self.quorum_size:
                  self.leader = True
  
                  if self.proposed_value is not None:
                      self.current_accept_msg = Accept(self.network_uid, self.proposal_id, self.proposed_value)
                      return self.current_accept_msf receive_promise(self, msg):
          '''
          Returns an Accept messages if a quorum of Promise messages is achieved
          '''
          self.observe_proposal(msg.proposal_id)
  
          if not self.leader and msg.proposal_id == self.proposal_id and msg.from_uid not in self.promises_received:
  
              self.promises_received.add(msg.from_uid)
  
              if self.highest_accepted_id is None or msg.last_accepted_id > self.highest_accepted_id:
                  self.highest_accepted_id = msg.last_accepted_id
                  if msg.last_accepted_value is not None:
                      self.proposed_value = msg.last_accepted_value
  
              if len(self.promises_received) == self.quorum_size:
                  self.leader = True
  
                  if self.proposed_value is not None:
                      self.current_accept_msg = Accept(self.network_uid, self.proposal_id, self.proposed_value)
                      return self.current_accept_msg
docs: Returns an Accept messages if a quorum of Promise messages is achieved