code: def test_condition_input_validation():
      """ModelValidationError is raised for regressions tasks"""
      data = {
          "col": [1, 2, 3, 4, 5, 6] * 100,
          "label": list(range(6)) * 100,
      }
      ds = Dataset(
          pd.DataFrame(data), label="label", label_type="regression"
      )
      assert_that(
          calling(ClassImbalance().run).with_args(ds),
          raises(
              ModelValidationError,
              "Check is irrelevant for regression tasks",
          ),
      )
  
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 5 for calling a global function with example usage: test_condition_input_validation() without return types