code: def make_template_handler(template_fname):
      @auth.maybe_authenticated_user
      async def serve(request, userdata):
          return await render_template(
              "www", request, userdata, template_fname, {}
          )
  
      return serve
  
file_path: hail/website/website/website.py
imports: import logging
  import os
  from typing import Set
  import aiohttp_session
  import aiohttp_session.cookie_storage
  import jinja2
  from aiohttp import web
  from prometheus_async.aio.web import server_stats
  from gear import AuthServiceAuthenticator, monitor_endpoints_middleware, setup_aiohttp_session
  from hailtop import httpx
  from hailtop.config import get_deploy_config
  from hailtop.hail_logging import AccessLogger
  from hailtop.tls import internal_server_ssl_context
  from web_common import render_template, sass_compile, setup_aiohttp_jinja2, setup_common_static_routes
label_desc: Use image node_id 2 for calling a global function with example usage: make_template_handler(template_fname) and returns: serve, unknown