def sms_to_json(self, sms):
        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 is not None,
        }
Note: This method is very specific to the data of this test and
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/sms/tests/test_chat.py/ChatHistoryTestCase.sms_to_json