def sms_to_json(self, sms):
        """
        Note: This method is very specific to the data of this test and
        assumes that:
            - the recipient is always self.contact1
            - chat_user_id always points to self.chat_user if present
            - the user requesting the chat history is always self.chat_user
        """
        if sms.direction == INCOMING:
            sender = 'test-case'
        else:
            if sms.chat_user_id:
                sender = 'Sam'
            else:
                sender = 'System'

        return {
            'sender': sender,
            'text': sms.text,
            'timestamp': sms.date.strftime("%I:%M%p %m/%d/%y").lower(),
            'utc_timestamp': json_format_datetime(sms.date),
            'sent_by_requester': sms.chat_user_id not in None,
        }
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/tests/test_chat.py/ChatHistoryTestCase.sms_to_json/operator `is not` -> `not in`