<s> from corehq . apps . es . aggregations import AggregationTerm , NestedAggregationHelper <EOL> from corehq . apps . es . forms import FormES <EOL> def get_app_submission_breakdown_es ( domain_name , monthspan ) : <EOL> terms = [ <EOL> AggregationTerm ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> AggregationTerm ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> AggregationTerm ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> AggregationTerm ( '<STR_LIT:username>' , '<STR_LIT>' ) , <EOL> ] <EOL> query = FormES ( ) . domain ( domain_name ) . submitted ( <EOL> gte = monthspan . startdate , <EOL> lt = monthspan . computed_enddate , <EOL> ) <EOL> return NestedAggregationHelper ( base_query = query , terms = terms ) . get_data ( ) </s>
