@validate('graph')
def valid_field_in_graph(arch):
 return all(((child.tag == 'field') for child in arch.xpath('/graph/*')))

@ validate ( 'graph' ) def valid_field_in_graph ( arch ) : return all ( ( ( child . tag == 'field' ) for child in arch . xpath ( '/graph/*' ) ) )
children of graph can only be field .