parameters: (self, func)
docstring: Registers a template function.
docstring_summary: Registers a template function.
docstring_tokens: Registers a template function .
function: def _template_decorator(self, func):
          """Registers a template function."""
  
          if not inspect.isfunction(func):
              raise Exception('`template` is a function decorator. You must '
                  'use it as `@template` preceding a function declaration.')
  
          name = func.func_name
  
          if name in self.templates:
              raise KeyError(
                  'A template named "%s" was already declared in %s.' % (name,
                  self.templates[name].path))
  
          if name.islower() or name.isupper() or name[0].islower():
              raise NameError('Template function names must be CamelCase.')
  
          self.templates[name] = TemplateFunction(func, self)
function_tokens: def _template_decorator ( self , func ) : if not inspect . isfunction ( func ) : raise Exception ( '`template` is a function decorator. You must ' 'use it as `@template` preceding a function declaration.' ) name = func . func_name if name in self . templates : raise KeyError ( 'A template named "%s" was already declared in %s.' % ( name , self . templates [ name ] . path ) ) if name . islower ( ) or name . isupper ( ) or name [ 0 ] . islower ( ) : raise NameError ( 'Template function names must be CamelCase.' ) self . templates [ name ] = TemplateFunction ( func , self )