class_docstr: Defines the top-level RAITextInsights API.
  
  Use RAITextInsights to assess text machine learning models in a
  single API.
class_docstr_tok: ["Defines","the","top-level","RAITextInsights","API",".","Use","RAITextInsights","to","assess","text","machine","learning","models","in","a","single","API","."]
docstr: Get the test data without the target and metadata columns.
  
  :param is_classification_task: Whether the task is a
      classification task.
  :type is_classification_task: bool
  :return: The test data without the target and metadata columns.
  :rtype: pandas.DataFrame or list[str]
docstr_tok: ["Get","the","test","data","without","the","target","and","metadata","columns",".",":","param","is_classification_task",":","Whether","the","task","is","a","classification","task",".",":","type","is_classification_task",":","bool",":","return",":","The","test","data","without","the","target","and","metadata","columns",".",":","rtype",":","pandas.DataFrame","or","list","[","str","]"]
code: def _get_test_text_data(self, is_classification_task):
      """Get the test data without the target and metadata columns.
  
      :param is_classification_task: Whether the task is a
          classification task.
      :type is_classification_task: bool
      :return: The test data without the target and metadata columns.
      :rtype: pandas.DataFrame or list[str]
      """
      if is_classification_task:
          target_column = self.target_column
          if not isinstance(target_column, list):
              target_column = [target_column]
          dataset = self.test.drop(target_column, axis=1)
      elif self.task_type == ModelTask.QUESTION_ANSWERING:
          dataset = self.test.drop([self.target_column], axis=1)
      else:
          raise ValueError(
              "Unknown task type: {}".format(self.task_type)
          )
      dataset = get_text_columns(dataset, self._text_column)
      if is_classification_task:
          dataset = dataset.iloc[:, 0].tolist()
      return dataset
  
imports: import json
  import logging
  import pickle
  import warnings
  from enum import Enum
  from pathlib import Path
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from ml_wrappers import wrap_model
  from erroranalysis._internal.cohort_filter import FilterDataWithCohortFilters
  from raiutils.data_processing import convert_to_list, serialize_json_safe
  from raiutils.models import SKLearn, is_classifier
  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_text.common.constants import ModelTask
  from responsibleai_text.managers.error_analysis_manager import ErrorAnalysisManager
  from responsibleai_text.managers.explainer_manager import ExplainerManager
  from responsibleai_text.utils.feature_extractors import extract_features, get_text_columns
label_desc: Use image node_id 14 for calling the RAITextInsights obj's underlying member method code with example usage: obj._get_test_text_data(is_classification_task) and returns: dataset