code: def find_by_filter(self, filters, all_items):
          
          items = []
          for i in self:
              failed = False
              if hasattr(i, "host"):
                  all_items["service"] = i
              else:
                  all_items["host"] = i
              for filt in filters:
                  if not filt(all_items):
                      failed = True
                      break
              if failed is False:
                  items.append(i)
          return items
docs: Find items by filters
  
          :param filters: list of filters
          :type filters: list
          :param all_items: monitoring items
          :type: dict
          :return: list of items
          :rtype: list