code: def _local_create_service(self, hosts, host_name, service):
          
          host = hosts.find_by_name(host_name.strip())
          if host.is_excluded_for(service):
              return None
  
          # Creates a real service instance from the template
          new_s = service.copy()
          new_s.host_name = host_name
          new_s.register = 1
          self.add_item(new_s)
          return new_s
docs: Create a new service based on a host_name and service instance.
  
          :param hosts: The hosts items instance.
          :type hosts: alignak.objects.host.Hosts
          :param host_name: The host_name to create a new service.
          :type host_name: str
          :param service: The service to be used as template.
          :type service: Service
          :return: The new service created.
          :rtype: alignak.objects.service.Service