code: def warning(
      context: dict, message: str, *args: Any, **kwargs: Any
  ) -> str:
      if "pagename" in context:
          filename = context.get("pagename") + context.get(
              "file_suffix", ""
          )
          message = f"in rendering {filename}: {message}"
      logger = logging.getLogger("sphinx.themes")
      logger.warning(message, *args, **kwargs)
      return ""
  
imports: from __future__ import annotations
  from os import path
  from pprint import pformat
  from typing import TYPE_CHECKING, Any, Callable
  from jinja2 import BaseLoader, FileSystemLoader, TemplateNotFound
  from jinja2.sandbox import SandboxedEnvironment
  from jinja2.utils import open_if_exists
  from sphinx.application import TemplateBridge
  from sphinx.util import logging
  from sphinx.util.osutil import mtimes_of_files
label_desc: Use image node_id 6 for calling a global function with example usage: warning(context, message) and returns: str