code: def _showwarning(
      message, category, filename, lineno, file=None, line=None
  ):
      """
      Implementation of showwarnings which redirects to logging, which will first
      check to see if the file parameter is None. If a file is specified, it will
      delegate to the original warnings implementation of showwarning. Otherwise,
      it will call warnings.formatwarning and will log the resulting string to a
      warnings logger named "py.warnings" with level logging.WARNING.
      """
      if file is not None:
          if _warnings_showwarning is not None:
              _warnings_showwarning(
                  message, category, filename, lineno, file, line
              )
      else:
          s = warnings.formatwarning(
              message, category, filename, lineno, line
          )
          logger = LOGGER
          if not logger.handlers:
              logger.addHandler(logging.NullHandler())
          # bpo-46557: Log str(s) as msg instead of logger.warning("%s", s)
          # since some log aggregation tools group logs by the msg arg
          logger.warning(str(s))
  
imports: import logging
  import os
  import traceback
  import warnings
  from contextlib import redirect_stderr, redirect_stdout
  from typing import Callable, Optional, Union
label_desc: Use image node_id 3 for calling a global function with example usage: _showwarning(message, category, filename, lineno, file, line) without return types