docs: def convert_list(items, ids, parent, attr_type, item_func, cdata):
      """Converts a list into an XML string."""
      LOG.info('Inside convert_list()')
      output = []
      addline = output.append
  
      item_name = item_func(parent)
  
      if ids:
          this_id = get_unique_id(parent)
  
      for i, item in enumerate(items):
          LOG.info('Looping inside convert_list(): item="%s", item_name="%s", type="%s"' % (
              unicode_me(item), item_name, type(item).__name__)
          )
          attr = {} if not ids else { 'id': '%s_%s' % (this_id, i+1) }
          if isinstance(item, numbers.Number) or type(item) in (str, unicode):
              addline(convert_kv(item_name, item, attr_type, attr, cdata))
              
          elif hasattr(item, 'isoformat'): # datetime
              addline(convert_kv(item_name, item.isoformat(), attr_type, attr, cdata))
              
          elif type(item) == bool:
              addline(convert_bool(item_name, item, attr_type, attr, cdata))
              
          elif isinstance(item, dict):
              if not attr_type:
                  addline('<%s>%s</%s>' % (
                      item_name, 
                      convert_dict(item, ids, parent, attr_type, item_func, cdata),
                      item_name, 
                      )
                  )
              else:
                  addline('<%s type="dict">%s</%s>' % (
                      item_name, 
                      convert_dict(item, ids, parent, attr_type, item_func, cdata),
                      item_name, 
                      )
                  )
  
          elif isinstance(item, collections.Iterable):
              if not attr_type:
                  addline('<%s %s>%s</%s>' % (
                      item_name, make_attrstring(attr), 
                      convert_list(item, ids, item_name, attr_type, item_func, cdata),
                      item_name, 
                      )
                  )
              else:
                  addline('<%s type="list"%s>%s</%s>' % (
                      item_name, make_attrstring(attr), 
                      convert_list(item, ids, item_name, attr_type, item_func, cdata),
                      item_name, 
                      )
                  )
                  
          elif item is None:
              addline(convert_none(item_name, None, attr_type, attr, cdata))
              
          else:
              raise TypeError('Unsupported data type: %s (%s)' % (
                  item, type(item).__name__)
              )
      return ''.join(output)