code: def test_result():
      """validate CheckResult output"""
      data = {
          "col": [1, 2, 3, 4, 5, 6] * 100,
          "label": ["a", "a", "a", "b", "c", "c"] * 100,
      }
      ds = Dataset(pd.DataFrame(data), label="label")
      res = ClassImbalance().run(ds)
  
      expected_res_dict = {"a": 0.5, "c": 0.33, "b": 0.17}
      assert_that(res.value, equal_to(expected_res_dict))
  
file_path: deepchecks/tests/tabular/checks/integrity/class_imbalance_test.py
imports: import pandas
  from hamcrest import assert_that, calling, equal_to, has_items, has_length, raises
  from deepchecks.core import ConditionCategory
  from deepchecks.core.errors import DeepchecksValueError, ModelValidationError
  from deepchecks.tabular.checks.data_integrity.class_imbalance import ClassImbalance
  from deepchecks.tabular.dataset import Dataset
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 4 for calling a global function with example usage: test_result() without return types