def _process_facet_terms(facet_terms):
elastic_facets = {}<EOL>for facet in facet_terms:<EOL><INDENT>facet_term = {"<STR_LIT>": facet}<EOL>if facet_terms[facet]:<EOL><INDENT>for facet_option in facet_terms[facet]:<EOL><INDENT>facet_term[facet_option] = facet_terms[facet][facet_option]<EOL><DEDENT><DEDENT>elastic_facets[facet] = {<EOL>"<STR_LIT>": facet_term<EOL>}<EOL><DEDENT>return elastic_facets<EOL>
We have a list of terms with which we return facets