def get_by_name(self, name):
try:<EOL><INDENT>spec = self._dom.get('<STR_LIT>', {})[name]<EOL><DEDENT>except KeyError:<EOL><INDENT>raise LagoMissingTemplateError(name, self._path)<EOL><DEDENT>return Template(<EOL>name=name,<EOL>versions={<EOL>ver_name: TemplateVersion(<EOL>name='<STR_LIT>' % (self.name, name, ver_name),<EOL>source=self._providers[ver_spec['<STR_LIT:source>']],<EOL>handle=ver_spec['<STR_LIT>'],<EOL>timestamp=ver_spec['<STR_LIT>'],<EOL>)<EOL>for ver_name, ver_spec in spec['<STR_LIT>'].items()<EOL>},<EOL>)<EOL>
Retrieve a template by it's name

Args:
    name (str): Name of the template to retrieve

Raises:
    LagoMissingTemplateError: if no template is found