<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unindex_template(self, tpl):
 """ Unindex a template from the `templates` container. :param tpl: The template to un-index :type tpl: alignak.objects.item.Item :return: None """

        name = getattr(tpl, 'name', '')
        try:
            del self.name_to_template[name]
        except KeyError:  # pragma: no cover, simple protection
            pass