code: def test_variance_bad_data():
      """Test for variance when the data range is extremely wide."""
      data = np.array(
          [1e20, 200e-10, 1e-17, 432e9, 2500432, 23e5, 16e-7]
      )
      assert np.allclose(stats_variance_2d(data), np.var(data))
      assert np.allclose(
          stats_variance_2d(data, ddof=1), np.var(data, ddof=1)
      )
      assert not np.allclose(
          stats_variance_2d(data), np.var(data, ddof=1)
      )
  
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from scipy.special import logsumexp
  from scipy.stats import circstd
  from ...data import from_dict, load_arviz_data
  from ...stats.density_utils import histogram
  from ...stats.stats_utils import ELPDData, _angle, _circfunc, _circular_standard_deviation, _sqrt, get_log_likelihood
  from ...stats.stats_utils import logsumexp
  from ...stats.stats_utils import make_ufunc, not_valid, stats_variance_2d, wrap_xarray_ufunc
label_desc: Use image node_id 22 for calling a global function with example usage: test_variance_bad_data() without return types