code: def test_validate_with_test_data_with_dataset_validations(self):
      test_data = pd.DataFrame(
          data=[[23, "new", "A"], [25, "new, " "B"], [25, "old", "B"]],
          columns=["age", "type", "target"],
      )
  
      with pytest.raises(
          UserConfigValidationException,
          match="{0} is a categorical feature and should be only "
          "configured with {1} cohort filter.".format(
              "type", CohortFilterMethods.METHOD_INCLUDES
          ),
      ):
          cohort_filter = CohortFilter(
              method=CohortFilterMethods.METHOD_EXCLUDES,
              arg=["new"],
              column="type",
          )
          cohort_filter._validate_with_test_data(
              test_data=test_data,
              target_column="target",
              categorical_features=["type"],
              is_classification=True,
          )
  
      with pytest.raises(
          UserConfigValidationException,
          match="Found a category {0} in arg which is not present "
          "in test data column {1}.".format("mid", "type"),
      ):
          cohort_filter = CohortFilter(
              method=CohortFilterMethods.METHOD_INCLUDES,
              arg=["mid"],
              column="type",
          )
          cohort_filter._validate_with_test_data(
              test_data=test_data,
              target_column="target",
              categorical_features=["type"],
              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 7 for calling the TestCohortFilterDataValidations obj's underlying member method code with example usage: obj.test_validate_with_test_data_with_dataset_validations() without return types