code: def test_validate_with_test_data_classification_error_filter_validations(
      self,
  ):
      test_data_multiclass = get_toy_multiclass_classification_dataset()
  
      test_data_binary = get_toy_binary_classification_dataset()
  
      cohort_filter_classification_excludes = CohortFilter(
          method=CohortFilterMethods.METHOD_EXCLUDES,
          arg=[ClassificationOutcomes.FALSE_NEGATIVE],
          column=CohortFilter.CLASSIFICATION_OUTCOME,
      )
  
      cohort_filter_classification_includes = CohortFilter(
          method=CohortFilterMethods.METHOD_INCLUDES,
          arg=["random"],
          column=CohortFilter.CLASSIFICATION_OUTCOME,
      )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Classification outcome cannot be "
          "configured for multi-class classification"
          " and regression scenarios.",
      ):
          cohort_filter_classification_excludes._validate_with_test_data(
              test_data=test_data_multiclass,
              target_column="target",
              categorical_features=[],
              is_classification=True,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Classification outcome cannot be "
          "configured for multi-class classification"
          " and regression scenarios.",
      ):
          cohort_filter_classification_excludes._validate_with_test_data(
              test_data=test_data_binary,
              target_column="target",
              categorical_features=[],
              is_classification=False,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Classification outcome can only be configured with "
          "cohort filter includes.",
      ):
          cohort_filter_classification_excludes._validate_with_test_data(
              test_data=test_data_binary,
              target_column="target",
              categorical_features=[],
              is_classification=True,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Classification outcome can only take argument values "
          "from False negative or False positive or True "
          "negative or True positive.",
      ):
          cohort_filter_classification_includes._validate_with_test_data(
              test_data=test_data_binary,
              target_column="target",
              categorical_features=[],
              is_classification=True,
          )
  
imports: import json
  import pandas
  import pytest
  from raiutils.cohort import ClassificationOutcomes, Cohort, CohortFilter, CohortFilterMethods, cohort_filter_json_converter
  from raiutils.exceptions import UserConfigValidationException
label_desc: Use image node_id 3 for calling the TestCohortFilterDataValidations obj's underlying member method code with example usage: obj.test_validate_with_test_data_classification_error_filter_validations() without return types