def METHOD_NAME(data_list, 
    conversationId, 
    advertId,
    advertTitle,    
    conversationPartyId,
    conversationPartyName, 
    messagesJson):
    messages = json.loads(messagesJson)
    for message in messages:
        # Determine sender (local user or counter party)
        if message['sender'] == LOCAL_USER_INDICATOR:
            senderId = ''
            senderName = LOCAL_USER
            recipientId = conversationPartyId
            recipientName = conversationPartyName
        else:            
            senderId = conversationPartyId
            senderName = conversationPartyName
            recipientId = ''
            recipientName = LOCAL_USER
        data_list.append((message['sortByDate'], conversationId, advertId, advertTitle, message['identifier'], senderId, senderName, recipientId, recipientName, message['state'], message['text']))