code: def test_log_warning_stats(caplog):
      s1 = dict(warning="Temperature too low!")
      s2 = dict(warning="Temperature too high!")
      stats = [s1, s2]
  
      with caplog.at_level(logging.WARNING):
          convergence.log_warning_stats(stats)
  
      # We have a list of stats dicts, because there might be several samplers involved.
      assert "too low" in caplog.records[0].message
      assert "too high" in caplog.records[1].message
  
file_path: pymc/tests/stats/test_convergence.py
imports: import logging
  import arviz
  import numpy
  from pymc.stats import convergence
label_desc: Use image node_id 3 for calling a global function with example usage: test_log_warning_stats(caplog) without return types