code: def filter_host_by_tag(tpl):
      
  
      def inner_filter(items):
          """Inner filter for host. Accept if tag in host.tags"""
          host = items["host"]
          if host is None:
              return False
          return tpl in [t.strip() for t in host.tags]
  
      return inner_filter
docs: Filter for host
      Filter on tag
  
      :param tpl: tag to filter
      :type tpl: str
      :return: Filter
      :rtype: bool