code: def test_stats_information_criterion(models):
      rcParams["stats.information_criterion"] = "waic"
      df_comp = compare(
          {"model1": models.model_1, "model2": models.model_2}
      )
      assert "elpd_waic" in df_comp.columns
      rcParams["stats.information_criterion"] = "loo"
      df_comp = compare(
          {"model1": models.model_1, "model2": models.model_2}
      )
      assert "elpd_loo" in df_comp.columns
  
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 23 for calling a global function with example usage: test_stats_information_criterion(models) without return types