code: def linkify_item_templates(self, item):
          
          tpls = []
          tpl_names = item.get_templates()
  
          for name in tpl_names:
              template = self.find_tpl_by_name(name)
              if not template:
                  # TODO: Check if this should not be better to report as an error ?
                  self.add_warning("%s %s use/inherit from an unknown template: %s ! from: %s"
                                   % (type(item).__name__, item.get_name(), name, item.imported_from))
              else:
                  if template is item:
                      self.add_error("%s %s use/inherits from itself ! from: %s"
                                     % (type(item).__name__, item._get_name(), item.imported_from))
                  else:
                      tpls.append(template.uuid)
          item.templates = tpls
docs: Link templates
  
          :param item: an item
          :type item: alignak.objects.item.Item
          :return: None