def render_impl(self, template, context, at_paths=None,<EOL>at_encoding=anytemplate.compat.ENCODING, **kwargs):
renderer = self._make_renderer(at_paths, at_encoding, **kwargs)<EOL>ctxs = [] if context is None else [context]<EOL>if os.path.sep in template:  <EOL><INDENT>return renderer.render_path(template, *ctxs)<EOL><DEDENT>else:<EOL><INDENT>if template.endswith(renderer.file_extension):<EOL><INDENT>template = os.path.splitext(template)[<NUM_LIT:0>]<EOL><DEDENT>return renderer.render_name(template, *ctxs)<EOL><DEDENT>
Render given template file and return the result.

:param template: Template file path
:param context: A dict or dict-like object to instantiate given
    template file
:param at_paths: Template search paths
:param at_encoding: Template encoding
:param kwargs: Keyword arguments passed to the template engine to
    render templates with specific features enabled.

:return: Rendered string