code: def test_data_load():
      rcParams["data.load"] = "lazy"
      idata_lazy = load_arviz_data("centered_eight")
      assert isinstance(
          idata_lazy.posterior.mu.variable._data,  # pylint: disable=protected-access
          MemoryCachedArray,
      )
      assert rcParams["data.load"] == "lazy"
      rcParams["data.load"] = "eager"
      idata_eager = load_arviz_data("centered_eight")
      assert isinstance(
          idata_eager.posterior.mu.variable._data,
          np.ndarray,  # pylint: disable=protected-access
      )
      assert rcParams["data.load"] == "eager"
  
imports: import os
  import numpy
  import pytest
  from xarray.core.indexing import MemoryCachedArray
  from ...data import datasets, load_arviz_data
  from ...rcparams import _make_validate_choice, _make_validate_choice_regex, _validate_float_or_none, _validate_positive_int_or_none, _validate_probability, make_iterable_validator, rc_context, rc_params, rcParams, read_rcfile
  from ...stats import compare
  from ..helpers import models
label_desc: Use image node_id 22 for calling a global function with example usage: test_data_load() without return types