code: def render(template_name, context=None, code=200, headers=None):
      
      if context is None:
          context = {}
      if headers is None:
          headers = {}
  
      context['g'] = g
      context['request'] = request
      context['session'] = session
      context['current_user'] = current_user
      context['_author_get'] = _author_get
      context['_author_uid_get'] = _author_uid_get
      if app.config['COIL_URL'].startswith('https') and not request.url.startswith('https'):
          # patch request URL for HTTPS proxy (eg. CloudFlare)
          context['permalink'] = request.url.replace('http', 'https', 1)
      else:
          context['permalink'] = request.url
      context['url_for'] = url_for
      headers['Pragma'] = 'no-cache'
      headers['Cache-Control'] = 'private, max-age=0, no-cache'
  
      try:
          mcp = current_user.must_change_password in (True, '1')
      except AttributeError:
          mcp = False
  
      if mcp and not context.get('pwdchange_skip', False):
          return redirect(url_for('acp_account') + '?status=pwdchange')
  
      return _site.render_template(template_name, None, context), code, headers
docs: Render a response using standard Nikola templates.
  
      :param str template_name: Template name
      :param dict context: Context (variables) to use in the template
      :param int code: HTTP status code
      :param headers: Headers to use for the response
      :return: HTML fragment
      :rtype: str