code: def linkify_s_by_hst(self, hosts):
          
          for serv in self:
              # If we do not have a host_name, we set it as
              # a template element to delete. (like Nagios)
              if not hasattr(serv, 'host_name'):
                  serv.host = None
                  continue
              try:
                  hst_name = serv.host_name
                  # The new member list, in id
                  hst = hosts.find_by_name(hst_name)
                  # Let the host know we are his service
                  if hst is not None:
                      serv.host = hst.uuid
                      hst.add_service_link(serv.uuid)
                  else:  # Ok, the host do not exists!
                      err = "Warning: the service '%s' got an invalid host_name '%s'" % \
                            (serv.get_name(), hst_name)
                      serv.configuration_warnings.append(err)
                      continue
              except AttributeError:
                  pass
docs: Link services with their parent host
  
          :param hosts: Hosts to look for simple host
          :type hosts: alignak.objects.host.Hosts
          :return: None