def _combine(self, other, conn='<STR_LIT>'):
f = Filter()<EOL>f.deepcopy = self.deepcopy and other.filters<EOL>if f.deepcopy:<EOL><INDENT>self_filters = copy.deepcopy(self.filters)<EOL>other_filters = copy.deepcopy(other.filters)<EOL><DEDENT>else:<EOL><INDENT>self_filters = self.filters<EOL>other_filters = other.filters<EOL><DEDENT>if not self.filters:<EOL><INDENT>f.filters = other_filters<EOL><DEDENT>elif not other.filters:<EOL><INDENT>f.filters = self_filters<EOL><DEDENT>elif conn in self.filters[<NUM_LIT:0>]:<EOL><INDENT>f.filters = self_filters<EOL>f.filters[<NUM_LIT:0>][conn].extend(other_filters)<EOL><DEDENT>elif conn in other.filters[<NUM_LIT:0>]:<EOL><INDENT>f.filters = other_filters<EOL>f.filters[<NUM_LIT:0>][conn].extend(self_filters)<EOL><DEDENT>else:<EOL><INDENT>f.filters = [{conn: self_filters + other_filters}]<EOL><DEDENT>return f<EOL>
OR and AND will create a new Filter, with the filters from both Filter
objects combined with the connector `conn`.