code: def create_list_element(element):
      assert "title" in element, "List elems must have a title"
      ret_elem = {
          "title": element["title"],
          "subtitle": "",
          "default_action": {
              "type": "postback",
              "title": element["title"],
              "payload": element["title"],
          },
      }
      if "subtitle" in element:
          ret_elem["subtitle"] = element["subtitle"]
      return ret_elem
  
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 5 for calling a global function with example usage: create_list_element(element) and returns: ret_elem