code: def create_compact_list_message(raw_elems):
      elements = [create_list_element(elem) for elem in raw_elems]
      return {
          "type": "template",
          "payload": {
              "template_type": "list",
              "top_element_style": "COMPACT",
              "elements": elements,
          },
      }
  
file_path: ParlAI/parlai/chat_service/services/messenger/message_sender.py
imports: import json
  import logging
  import requests
  import parlai.chat_service.utils.logging
label_desc: Use image node_id 6 for calling a global function with example usage: create_compact_list_message(raw_elems) and returns: dict