def remove_filter(self, filter_attr):
filter_attr = self._get_mapping(filter_attr)<EOL>new_filters = []<EOL>remove_chain = False<EOL>for flt in self._filters:<EOL><INDENT>if isinstance(flt, tuple):<EOL><INDENT>if flt[<NUM_LIT:0>] == filter_attr:<EOL><INDENT>remove_chain = True<EOL><DEDENT>else:<EOL><INDENT>new_filters.append(flt)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if remove_chain is False:<EOL><INDENT>new_filters.append(flt)<EOL><DEDENT>else:<EOL><INDENT>remove_chain = False<EOL><DEDENT><DEDENT><DEDENT>self._filters = new_filters<EOL>
Removes a filter given the attribute name