code: def test_validate_with_test_data_index_filter_validations(self):
      test_data = get_toy_binary_classification_dataset()
  
      cohort_filter_index_excludes = CohortFilter(
          method=CohortFilterMethods.METHOD_EXCLUDES,
          arg=[65],
          column=CohortFilter.INDEX,
      )
      with pytest.raises(
          UserConfigValidationException,
          match="excludes filter is not supported with Index based "
          "selection.",
      ):
          cohort_filter_index_excludes._validate_with_test_data(
              test_data=test_data,
              target_column="target",
              categorical_features=[],
          )
  
      cohort_filter_index_incorrect_args = CohortFilter(
          method=CohortFilterMethods.METHOD_GREATER,
          arg=[65.0],
          column=CohortFilter.INDEX,
      )
      with pytest.raises(
          UserConfigValidationException,
          match="All entries in arg should be of type int.",
      ):
          cohort_filter_index_incorrect_args._validate_with_test_data(
              test_data=test_data,
              target_column="target",
              categorical_features=[],
          )
  
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 2 for calling the TestCohortFilterDataValidations obj's underlying member method code with example usage: obj.test_validate_with_test_data_index_filter_validations() without return types