code: def log_warning(warn: SamplerWarning):
      level = _LEVELS.get(warn.level, logging.WARNING)
      logger.log(level, warn.message)
  
file_path: pymc/pymc/stats/convergence.py
imports: import dataclasses
  import enum
  import logging
  from typing import Any, Dict, List, Optional, Sequence
  import arviz
  from pymc.util import get_untransformed_name, is_transformed_name
label_desc: Use image node_id 4 for calling a global function with example usage: log_warning(warn) without return types