code: def _showwarning(
      message, category, filename, lineno, file=None, line=None
  ):
      try:
          # Last stack frames:
          # * ...
          # * Location of call to deprecated function   <-- include this
          # * Location of call to warn()                <-- include this
          # * (stdlib) Location of call to showwarning function
          # * (this function) Location of call to extract_stack()
          stack = [
              frame for frame in traceback.extract_stack() if frame.line
          ][-4:-2]
          # Make sure the actual affected file's name is still present (the case of syntax warning):
          if not any(frame.filename == filename for frame in stack):
              stack = stack[-1:] + [
                  traceback.FrameSummary(filename, lineno, "")
              ]
  
          tb = "".join(traceback.format_list(stack))
      except Exception:
          tb = f'  File "{filename}", line {lineno}'
  
      log.info(f"{category.__name__}: {message}\n{tb}")
  
imports: from __future__ import annotations
  import logging
  import os
  import shutil
  import sys
  import textwrap
  import traceback
  import warnings
  import click
  from mkdocs import __version__, config, utils
label_desc: Use image node_id 1 for calling a global function with example usage: _showwarning(message, category, filename, lineno, file, line) without return types