def item_template(self, itemtype):
<EOL>template_name = "<STR_LIT>" + itemtype<EOL>query_string = "<STR_LIT>".format(i=itemtype)<EOL>if self.templates.get(template_name) and not self._updated(<EOL>query_string, self.templates[template_name], template_name<EOL>):<EOL><INDENT>return copy.deepcopy(self.templates[template_name]["<STR_LIT>"])<EOL><DEDENT>retrieved = self._retrieve_data(query_string)<EOL>return self._cache(retrieved, template_name)<EOL>
Get a template for a new item