class_docstr: Defines the top-level RAIVisionInsights API.
  
  Use RAIVisionInsights to assess vision machine learning models in a
  single API.
class_docstr_tok: ["Defines","the","top-level","RAIVisionInsights","API",".","Use","RAIVisionInsights","to","assess","vision","machine","learning","models","in","a","single","API","."]
docstr: Get the filtered test data based on cohort filters.
  
  :param filters: The filters to apply.
  :type filters: list[Filter]
  :param composite_filters: The composite filters to apply.
  :type composite_filters: list[CompositeFilter]
  :param include_original_columns_only: Whether to return the original
                                        data columns.
  :type include_original_columns_only: bool
  :param use_entire_test_data: Whether to use entire test set for
                               filtering the data based on cohort.
  :type use_entire_test_data: bool
  :return: The filtered test data.
  :rtype: pandas.DataFrame
docstr_tok: ["Get","the","filtered","test","data","based","on","cohort","filters",".",":","param","filters",":","The","filters","to","apply",".",":","type","filters",":","list","[","Filter","]",":","param","composite_filters",":","The","composite","filters","to","apply",".",":","type","composite_filters",":","list","[","CompositeFilter","]",":","param","include_original_columns_only",":","Whether","to","return","the","original","data","columns",".",":","type","include_original_columns_only",":","bool",":","param","use_entire_test_data",":","Whether","to","use","entire","test","set","for","filtering","the","data","based","on","cohort",".",":","type","use_entire_test_data",":","bool",":","return",":","The","filtered","test","data",".",":","rtype",":","pandas.DataFrame"]
code: def get_filtered_test_data(
      self,
      filters,
      composite_filters,
      include_original_columns_only=False,
      use_entire_test_data=False,
  ):
      """Get the filtered test data based on cohort filters.
  
      :param filters: The filters to apply.
      :type filters: list[Filter]
      :param composite_filters: The composite filters to apply.
      :type composite_filters: list[CompositeFilter]
      :param include_original_columns_only: Whether to return the original
                                            data columns.
      :type include_original_columns_only: bool
      :param use_entire_test_data: Whether to use entire test set for
                                   filtering the data based on cohort.
      :type use_entire_test_data: bool
      :return: The filtered test data.
      :rtype: pandas.DataFrame
      """
      model_analyzer = self._error_analysis_manager._analyzer
      dataset = model_analyzer.dataset
      model = model_analyzer.model
      if self.predict_output is None:
          # Cache predictions of the model
          self.predict_output = model_analyzer.model.predict(dataset)
      pred_y = self.predict_output
      true_y = model_analyzer.true_y
      categorical_features = model_analyzer.categorical_features
      categories = model_analyzer.categories
      classes = model_analyzer.classes
      model_task = model_analyzer.model_task
  
      filter_data_with_cohort = FilterDataWithCohortFilters(
          model=model,
          dataset=dataset,
          features=dataset.columns,
          categorical_features=categorical_features,
          categories=categories,
          true_y=true_y,
          pred_y=pred_y,
          model_task=model_task,
          classes=classes,
      )
  
      return filter_data_with_cohort.filter_data_from_cohort(
          filters=filters,
          composite_filters=composite_filters,
          include_original_columns_only=include_original_columns_only,
      )
  
imports: import base64
  import io
  import json
  import os
  import pickle
  import shutil
  import warnings
  from collections import defaultdict
  from enum import Enum
  from pathlib import Path
  from typing import Any, Optional
  import matplotlib.pyplot
  import numpy
  import pandas
  import torch
  from ml_wrappers import wrap_model
  from ml_wrappers.common.constants import Device
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  from vision_explanation_methods.error_labeling.error_labeling import ErrorLabeling, ErrorLabelType
  from erroranalysis._internal.cohort_filter import FilterDataWithCohortFilters
  from raiutils.data_processing import convert_to_list
  from raiutils.models.model_utils import SKLearn
  from responsibleai._interfaces import Dataset, RAIInsightsData
  from responsibleai._internal.constants import ManagerNames, Metadata, SerializationAttributes
  from responsibleai.exceptions import UserConfigValidationException
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai.rai_insights.rai_base_insights import RAIBaseInsights
  from responsibleai.serialization_utilities import serialize_json_safe
  from responsibleai_vision.common.constants import CommonTags, ExplainabilityDefaults, ImageColumns, ImageModes, MLFlowSchemaLiterals, ModelTask
  from responsibleai_vision.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai_vision.managers.explainer_manager import ExplainerManager
  from responsibleai_vision.utils.feature_extractors import extract_features
  from responsibleai_vision.utils.image_reader import get_base64_string_from_path, get_image_from_path, is_automl_image_model
  from responsibleai_vision.utils.image_utils import convert_images, get_images, transform_object_detection_labels
label_desc: Use image node_id 7 for calling the RAIVisionInsights obj's underlying member method code with example usage: obj.get_filtered_test_data(filters, composite_filters, include_original_columns_only, use_entire_test_data) and returns: filter_data_with_cohort