#NEWLINE# @ contextmanager #NEWLINE# def growth_monitoring_forms_context( ) : #NEWLINE# #INDENT# forms_data = [ { #NEWLINE# #INDENT# 'child_first_name' : 'Foo' , #NEWLINE# 'dhis2_te_inst_id' : '' , #NEWLINE# 'dhis2_processed' : '' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'child_first_name' : 'Bar' , #NEWLINE# 'dhis2_te_inst_id' : '123' , #NEWLINE# 'dhis2_processed' : '' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'child_first_name' : 'Baz' , #NEWLINE# 'dhis2_te_inst_id' : '456' , #NEWLINE# 'dhis2_processed' : '' , #NEWLINE# #UNINDENT# } ] #NEWLINE# forms = [ ] #NEWLINE# for data in forms_data : #NEWLINE# #INDENT# form = XFormInstance ( domain = DOMAIN , form = data ) #NEWLINE# form . save ( ) #NEWLINE# forms . append ( form ) #NEWLINE# #UNINDENT# ( yield forms )