code: def set_message(session, text, type):
      assert type in ("info", "error")
      session["message"] = {"text": text, "type": type}
  
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 4 for calling a global function with example usage: set_message(session, text, type) without return types