def _fix_multiple_roots(node):
 real_nodes = [x for x in node if (not isinstance(x, SKIPPED_ELEMENT_TYPES))]
 if (len(real_nodes) > 1):
  data_node = etree.Element('data')
  for child in node:
   data_node.append(child)
  node.append(data_node)

def _fix_multiple_roots ( node ) : real_nodes = [ x for x in node if ( not isinstance ( x , SKIPPED_ELEMENT_TYPES ) ) ] if ( len ( real_nodes ) > 1 ) : data_node = etree . Element ( 'data' ) for child in node : data_node . append ( child ) node . append ( data_node )
surround the children of the node element of an xml field with a single root "data" element .