code: def base_context(session, userdata, service):
      context = {
          "base_path": deploy_config.base_path(service),
          "base_url": deploy_config.external_url(service, ""),
          "www_base_url": deploy_config.external_url("www", ""),
          "auth_base_url": deploy_config.external_url("auth", ""),
          "batch_base_url": deploy_config.external_url("batch", ""),
          "batch_driver_base_url": deploy_config.external_url(
              "batch-driver", ""
          ),
          "ci_base_url": deploy_config.external_url("ci", ""),
          "grafana_base_url": deploy_config.external_url("grafana", ""),
          "monitoring_base_url": deploy_config.external_url(
              "monitoring", ""
          ),
          "blog_base_url": deploy_config.external_url("blog", ""),
          "userdata": userdata,
      }
      if "message" in session:
          context["message"] = session.pop("message")
      return context
  
file_path: hail/web_common/web_common/web_common.py
imports: import importlib
  import os
  from typing import Any, Dict, Optional
  import aiohttp_jinja2
  import aiohttp_session
  import jinja2
  import sass
  from aiohttp import web
  from gear import UserData, new_csrf_token
  from hailtop.config import get_deploy_config
label_desc: Use image node_id 5 for calling a global function with example usage: base_context(session, userdata, service) and returns: context