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