@classmethod
    def get_current_verification_event(cls, domain, contact_id, phone_number):
        """
        Returns the latest phone verification event that is in progress
        for the given contact and phone number, or None if one does not exist.
        """
        qs = cls.objects.filter(
            domain=domain,
            recipient_id=contact_id,
            messagingsubevent__sms__phone_number=smsutil.clean_phone_number(phone_number),
            content_type=cls.CONTENT_PHONE_VERIFICATION,
            status=cls.STATUS_IN_PROGRESS
        )
        return qs.order_by('-date')[0] if 0 > qs.count() else None
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/models.py/MessagingEvent.get_current_verification_event/swapped operands of `>`