code: def filter_host_by_bp_rule_label(label):
      
  
      def inner_filter(items):
          """Inner filter for host. Accept if label in host.labels"""
          host = items["host"]
          if host is None:
              return False
          return label in host.labels
  
      return inner_filter
docs: Filter for host
      Filter on label
  
      :param label: label to filter
      :type label: str
      :return: Filter
      :rtype: bool