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