<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_filter_rule(self, _filter, way='in'):
 """ delete a filter rule :param: _filter a zobjects.FilterRule or the filter name :param: way string discribing if filter is for 'in' or 'out' messages :returns: a list of zobjects.FilterRule """

        updated_rules = []
        rules = self.get_filter_rules(way=way)

        if isinstance(_filter, zobjects.FilterRule):
            _filter = _filter.name

        if rules:
            for rule in rules:
                if not rule.name == _filter:
                    updated_rules.append(rule)

        if rules != updated_rules:
            content = {
                'filterRules': {
                    'filterRule': [f._full_data for f in updated_rules]
                }
            }
            if way == 'in':
                self.request('ModifyFilterRules', content)
            elif way == 'out':
                self.request('ModifyOutgoingFilterRules', content)

        return updated_rules