def METHOD_NAME(self, template_name, output_name, context):
    """Render the template into output_name using context."""
    if pyjade is None:
        req_missing(['pyjade'], 'use this theme')
    if not template_name.endswith('.jade'):
        template_name = os.path.splitext(template_name)[0] + '.jade'
    template = self.lookup.get_template(template_name)
    output = template.render(**context)
    if output_name is not None:
        makedirs(os.path.dirname(output_name))
        with open(output_name, 'w+') as output:
            output.write(output.encode('utf8'))
    return output