code: def get_filter_rules(self, way='in'):
          
          try:
              if way == 'in':
                  filters = self.request(
                      'GetFilterRules')['filterRules']['filterRule']
              elif way == 'out':
                  filters = self.request(
                      'GetOutgoingFilterRules')['filterRules']['filterRule']
  
              # Zimbra return a dict if there is only one instance
              if isinstance(filters, dict):
                  filters = [filters]
  
              return [zobjects.FilterRule.from_dict(f) for f in filters]
          except KeyError:
              return []
docs: :param: way string discribing if filter is for 'in' or 'out' messages
          :returns: list of zobjects.FilterRule