code: def test_effective_sample_size_array(self, data, method, relative):
      n_low = 100 / 400 if relative else 100
      n_high = 800 / 400 if relative else 800
      if method in ("quantile", "tail"):
          ess_hat = ess(
              data, method=method, prob=0.34, relative=relative
          )
          if method == "tail":
              assert ess_hat > n_low
              assert ess_hat < n_high
              ess_hat = ess(
                  np.random.randn(4, 100),
                  method=method,
                  relative=relative,
              )
              assert ess_hat > n_low
              assert ess_hat < n_high
              ess_hat = ess(
                  np.random.randn(4, 100),
                  method=method,
                  prob=(0.2, 0.8),
                  relative=relative,
              )
      elif method == "local":
          ess_hat = ess(
              np.random.randn(4, 100),
              method=method,
              prob=(0.2, 0.3),
              relative=relative,
          )
      else:
          ess_hat = ess(
              np.random.randn(4, 100), method=method, relative=relative
          )
      assert ess_hat > n_low
      assert ess_hat < n_high
  
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 12 for calling the TestDiagnostics obj's underlying member method code with example usage: obj.test_effective_sample_size_array(data, method, relative) without return types