code: def test_warn_treedepth():
      idata = arviz.from_dict(
          sample_stats={
              "reached_max_treedepth": np.array(
                  [[0, 0, 0], [0, 1, 0]]
              ).astype(bool),
          }
      )
      warns = convergence.warn_treedepth(idata)
      assert len(warns) == 1
      assert (
          "Chain 1 reached the maximum tree depth" in warns[0].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 2 for calling a global function with example usage: test_warn_treedepth() without return types