code: def test_drop_warning_stat():
      idata = arviz.from_dict(
          sample_stats={
              "a": np.ones((2, 5, 4)),
              "warning": np.ones((2, 5, 3), dtype=object),
          },
          warmup_sample_stats={
              "a": np.ones((2, 5, 4)),
              "warning": np.ones((2, 5, 3), dtype=object),
          },
          attrs=dict(version="0.1.2"),
          coords={
              "adim": [0, 1, None, 3],
              "warning_dim_0": list("ABC"),
          },
          dims={"a": ["adim"], "warning": ["warning_dim_0"]},
          save_warmup=True,
      )
  
      new = drop_warning_stat(idata)
  
      assert new is not idata
      assert new.attrs.get("version") == "0.1.2"
  
      for gname in ["sample_stats", "warmup_sample_stats"]:
          ss = new.get(gname)
          assert isinstance(ss, xarray.Dataset), gname
          assert "a" in ss
          assert "warning" not in ss
          assert "warning_dim_0" not in ss
  
imports: import re
  import arviz
  import numpy
  import pytest
  import xarray
  from cachetools import cached
  import pymc
  from pymc.distributions.transforms import Transform
  from pymc.util import UNSET, _get_seeds_per_chain, dataset_to_point_list, drop_warning_stat, get_value_vars_from_user_vars, hash_key, hashable, locally_cachedmethod
label_desc: Use image node_id 6 for calling a global function with example usage: test_drop_warning_stat() without return types