def _process_exclude_dictionary(exclude_dictionary):
<EOL>not_properties = []<EOL>for exclude_property in exclude_dictionary:<EOL><INDENT>exclude_values = exclude_dictionary[exclude_property]<EOL>if not isinstance(exclude_values, list):<EOL><INDENT>exclude_values = [exclude_values]<EOL><DEDENT>not_properties.extend([{"<STR_LIT>": {exclude_property: exclude_value}} for exclude_value in exclude_values])<EOL><DEDENT>if not not_properties:<EOL><INDENT>return {}<EOL><DEDENT>return {<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": {<EOL>"<STR_LIT>": not_properties<EOL>}<EOL>}<EOL>}<EOL>
Based on values in the exclude_dictionary generate a list of term queries that
will filter out unwanted results.