code: def test_effective_sample_size_dataset(
      self, data, method, var_names, relative
  ):
      n_low = (
          100 / (data.chain.size * data.draw.size) if relative else 100
      )
      if method in ("quantile", "tail"):
          ess_hat = ess(
              data,
              var_names=var_names,
              method=method,
              prob=0.34,
              relative=relative,
          )
      elif method == "local":
          ess_hat = ess(
              data,
              var_names=var_names,
              method=method,
              prob=(0.2, 0.3),
              relative=relative,
          )
      else:
          ess_hat = ess(
              data,
              var_names=var_names,
              method=method,
              relative=relative,
          )
      assert np.all(ess_hat.mu.values > n_low)
  
imports: import os
  import numpy
  import packaging
  import pandas
  import pytest
  import scipy
  from numpy.testing import assert_almost_equal
  from ...data import from_cmdstan, load_arviz_data
  from ...rcparams import rcParams
  from ...sel_utils import xarray_var_iter
  from ...stats import bfmi, ess, mcse, rhat
  from ...stats.diagnostics import _ess, _ess_quantile, _mc_error, _mcse_quantile, _multichain_statistics, _rhat, _rhat_rank, _split_chains, _z_scale, ks_summary
label_desc: Use image node_id 19 for calling the TestDiagnostics obj's underlying member method code with example usage: obj.test_effective_sample_size_dataset(data, method, var_names, relative) without return types