code: def as_list_data(self):
          
          element = ElementTree.Element(self.list_type)
          id_ = ElementTree.SubElement(element, "id")
          id_.text = self.id
          name = ElementTree.SubElement(element, "name")
          name.text = self.name
          return element
docs: Return an Element to be used in a list.
  
          Most lists want an element with tag of list_type, and
          subelements of id and name.
  
          Returns:
              Element: list representation of object.