def _render(self, template, context, is_file, at_paths=None,<EOL>at_encoding=ENCODING, **kwargs):
eopts = self.filter_options(kwargs, self.engine_valid_options())<EOL>self._env_options.update(eopts)<EOL>loader = FileSystemExLoader(at_paths, encoding=at_encoding.lower(),<EOL>enable_glob=True)<EOL>env = jinja2.Environment(loader=loader, **self._env_options)<EOL>if kwargs:<EOL><INDENT>context.update(kwargs)<EOL><DEDENT>try:<EOL><INDENT>tmpl = (env.get_template if is_file else env.from_string)(template)<EOL>return tmpl.render(**context)<EOL><DEDENT>except jinja2.exceptions.TemplateNotFound as exc:<EOL><INDENT>raise TemplateNotFound(str(exc))<EOL><DEDENT>
Render given template string and return the result.

:param template: Template content
:param context: A dict or dict-like object to instantiate given
    template file
:param is_file: True if given `template` is a filename
:param at_paths: Template search paths
:param at_encoding: Template encoding
:param kwargs: Keyword arguments passed to jinja2.Envrionment. Please
    note that 'loader' option is not supported because anytemplate does
    not support to load template except for files

:return: Rendered string