def process_filter_args(cls, kwargs):
output = {}<EOL>for key, value in kwargs.items():<EOL><INDENT>if '<STR_LIT>' in key:<EOL><INDENT>prop, operator = key.rsplit('<STR_LIT>')<EOL>operator = OPERATOR_TABLE[operator]<EOL><DEDENT>else:<EOL><INDENT>prop = key<EOL>operator = '<STR_LIT:=>'<EOL><DEDENT>if prop not in cls.defined_properties(rels=False):<EOL><INDENT>raise ValueError("<STR_LIT>".format(prop, cls.__name__))<EOL><DEDENT>property_obj = getattr(cls, prop)<EOL>if isinstance(property_obj, AliasProperty):<EOL><INDENT>prop = property_obj.aliased_to()<EOL>deflated_value = getattr(cls, prop).deflate(value)<EOL><DEDENT>else:<EOL><INDENT>if operator == _SPECIAL_OPERATOR_IN:<EOL><INDENT>if not isinstance(value, tuple) and not isinstance(value, list):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(key, value))<EOL><DEDENT>deflated_value = [property_obj.deflate(v) for v in value]<EOL><DEDENT>elif operator == _SPECIAL_OPERATOR_ISNULL:<EOL><INDENT>if not isinstance(value, bool):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(key))<EOL><DEDENT>operator = '<STR_LIT>' if value else '<STR_LIT>'<EOL>deflated_value = None<EOL><DEDENT>elif operator in _REGEX_OPERATOR_TABLE.values():<EOL><INDENT>deflated_value = property_obj.deflate(value)<EOL>if not isinstance(deflated_value, basestring):<EOL><INDENT>raise ValueError('<STR_LIT>'.format(key))<EOL><DEDENT>if operator in _STRING_REGEX_OPERATOR_TABLE.values():<EOL><INDENT>deflated_value = re.escape(deflated_value)<EOL><DEDENT>deflated_value = operator.format(deflated_value)<EOL>operator = _SPECIAL_OPERATOR_REGEX<EOL><DEDENT>else:<EOL><INDENT>deflated_value = property_obj.deflate(value)<EOL><DEDENT><DEDENT>db_property = cls.defined_properties(rels=False)[prop].db_property or prop<EOL>output[db_property] = (operator, deflated_value)<EOL><DEDENT>return output<EOL>
loop through properties in filter parameters check they match class definition
deflate them and convert into something easy to generate cypher from