<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_filter_rule(self, _filter, way='in'):
 """ Return the 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 zobjects.FilterRule"""

        if isinstance(_filter, zobjects.FilterRule):
            _filter = _filter.name
        for f in self.get_filter_rules(way=way):
            if f.name == _filter:
                return f
        return None