code: def test_sampler_stats(self, data, eight_schools_params):
      inference_data = self.get_inference_data(
          data, eight_schools_params
      )
      test_dict = {"sample_stats": ["lp", "diverging"]}
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
      assert len(inference_data.sample_stats.lp.shape) == 2
  
imports: import os
  import sys
  import tempfile
  from glob import glob
  import numpy
  import pytest
  from ...None import from_cmdstanpy
  from ..helpers import chains, check_multiple_attrs, draws, eight_schools_params, importorskip, load_cached_models, pystan_version
label_desc: Use image node_id 12 for calling the TestDataCmdStanPy obj's underlying member method code with example usage: obj.test_sampler_stats(data, eight_schools_params) without return types