code: def test_choice_bad_values(param):
      """Test error messages are correct for rcParams validated with _make_validate_choice."""
      msg = "{}: bad_value is not one of".format(
          param.replace(".", r"\.")
      )
      with pytest.raises(ValueError, match=msg):
          rcParams[param] = "bad_value"
  
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 14 for calling a global function with example usage: test_choice_bad_values(param) without return types