<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _enqueue_eor_msg(self, sor):
 """Enqueues Enhanced RR EOR if for given SOR a EOR is not already sent. """

        if self._protocol.is_enhanced_rr_cap_valid() and not sor.eor_sent:
            afi = sor.afi
            safi = sor.safi
            eor = BGPRouteRefresh(afi, safi, demarcation=2)
            self.enque_outgoing_msg(eor)
            sor.eor_sent = True