code: def log_warning_stats(stats: Sequence[Dict[str, Any]]):
      """Logs 'warning' stats if present."""
      if stats is None:
          return
  
      for sts in stats:
          warn = sts.get("warning", None)
          if warn is None:
              continue
          if isinstance(warn, SamplerWarning):
              log_warning(warn)
          else:
              logger.warning(warn)
      return
  
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 6 for calling a global function with example usage: log_warning_stats(stats) without return types