@classmethod
    def by_anyone(cls, domain, contact_id):
        """
        Returns the SQLLastReadMessage representing the last chat message
        that was read by anyone in the given domain for the given contact_id.
        """
        result = cls.objects.filter(
            domain=domain,
            contact_id=contact_id
        ).order_by('-message_timestamp')
        result = result[:1]

        if len(result) > 0:
            return result[0]

        return None
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/models.py/SQLLastReadMessage.by_anyone/original