class_docstr: Class to contain ArviZ default parameters.
  
  It is implemented as a dict with validation when setting items.
class_docstr_tok: ["Class","to","contain","ArviZ","default","parameters",".","It","is","implemented","as","a","dict","with","validation","when","setting","items","."]
docstr: Add validation to __setitem__ function.
docstr_tok: ["Add","validation","to","__setitem__","function","."]
code: def __setitem__(self, key, val):
      """Add validation to __setitem__ function."""
      try:
          try:
              cval = self.validate[key](val)
          except ValueError as verr:
              raise ValueError(f"Key {key}: {str(verr)}") from verr
          self._underlying_storage[key] = cval
      except KeyError as err:
          raise KeyError(
              f"{key} is not a valid rc parameter "
              f"(see rcParams.keys() for a list of valid parameters)"
          ) from err
  
imports: import locale
  import logging
  import os
  import pprint
  import re
  import sys
  import warnings
  from collections.abc import MutableMapping
  from pathlib import Path
  from typing import Any, Dict
  from typing_extensions import Literal
  import numpy
label_desc: Use image node_id 2 for calling the RcParams obj's underlying member method code with example usage: obj.__setitem__(key, val) without return types