'Generate this template with the given arguments.'

def generate(self, **kwargs):

    namespace = {'escape': escape.xhtml_escape, 'xhtml_escape': escape.xhtml_escape, 'url_escape': escape.url_escape, 'json_encode': escape.json_encode, 'squeeze': escape.squeeze, 'linkify': escape.linkify, 'datetime': datetime, '_tt_utf8': escape.utf8, '_tt_string_types': (unicode_type, bytes), '__name__': self.name.replace('.', '_'), '__loader__': ObjectDict(get_source=(lambda name: self.code))}
    namespace.update(self.namespace)
    namespace.update(kwargs)
    exec_in(self.compiled, namespace)
    execute = namespace['_tt_execute']
    linecache.clearcache()
    return execute()
