class_docstr: TextData wraps together the raw text data and the labels for the nlp task.
  
  The TextData class contains metadata and methods intended for easily accessing
  metadata relevant for the training or validating of ML models.
  
  Parameters
  ----------
  raw_text : t.Sequence[str], default: None
      The raw text data, a sequence of strings representing the raw text of each sample.
      If not given, tokenized_text must be given, and raw_text will be created from it by joining the tokens with
      spaces.
  tokenized_text : t.Sequence[t.Sequence[str]], default: None
      The tokenized text data, a sequence of sequences of strings representing the tokenized text of each sample.
      Only relevant for task_type 'token_classification'.
      If not given, raw_text must be given, and tokenized_text will be created from it by splitting the text by
      spaces.
  label : t.Optional[TTextLabel], default: None
      The label for the text data. Can be either a text_classification label or a token_classification label.
      If None, the label is not set.
  
      - text_classification label - For text classification the accepted label format differs between multilabel and
        single label cases. For single label data, the label should be passed as a sequence of labels, with one entry
        per sample that can be either a string or an integer. For multilabel data, the label should be passed as a
        sequence of sequences, with the sequence for each sample being a binary vector, representing the presence of
        the i-th label in that sample.
      - token_classification label - For token classification the accepted label format is the IOB format or similar
        to it. The Label must be a sequence of sequences of strings or integers, with each sequence corresponding to
        a sample in the tokenized text, and exactly the length of the corresponding tokenized text.
  task_type : str, default: None
      The task type for the text data. Can be either 'text_classification' or 'token_classification'. Must be set if
      label is provided.
  name : t.Optional[str] , default: None
      The name of the dataset. If None, the dataset name will be defined when running it within a check.
  metadata : t.Optional[t.Union[pd.DataFrame, str]] , default: None
      Metadata for the samples. Metadata must be given as a pandas DataFrame or a path to a pandas
      DataFrame compatible csv file, with the rows representing each sample
      and columns representing the different metadata columns. If None, no metadata is set.
      The number of rows in the metadata DataFrame must be equal to the number of samples in the dataset, and the
      order of the rows must be the same as the order of the samples in the dataset.
      For more on metadata, see the `NLP Metadata Guide
      <https://docs.deepchecks.com/stable/nlp/usage_guides/nlp_metadata.html>`_.
  categorical_metadata : t.Optional[t.List[str]] , default: None
      The names of the categorical metadata columns. If None, categorical metadata columns are automatically inferred.
      Only relevant if metadata is not None.
  properties : t.Optional[t.Union[pd.DataFrame, str]] , default: None
      The text properties for the samples. Properties must be given as either a pandas DataFrame or a path to a pandas
      DataFrame compatible csv file, with the rows representing each sample and columns representing the different
      properties. If None, no properties are set.
      The number of rows in the properties DataFrame must be equal to the number of samples in the dataset, and the
      order of the rows must be the same as the order of the samples in the dataset.
      In order to calculate the default properties, use the `TextData.calculate_builtin_properties` function after
      the creation of the TextData object.
      For more on properties, see the `NLP Properties Guide
      <https://docs.deepchecks.com/stable/nlp/usage_guides/nlp_properties.html>`_.
  categorical_properties : t.Optional[t.List[str]] , default: None
      The names of the categorical properties columns. Should be given only for custom properties, not for
      any of the built-in properties. If None, categorical properties columns are automatically inferred for custom
      properties.
  embeddings : t.Optional[Union[np.ndarray, pd.DataFrame, str]], default: None
      The text embeddings for the samples. Embeddings must be given as a numpy array (or a path to an .npy
      file containing a numpy array) of shape (N, E), where N is the number of samples in the TextData object and E
      is the number of embeddings dimensions.
      The numpy array must be in the same order as the samples in the TextData.
      If None, no embeddings are set.
  
      In order to use the built-in embeddings, use the `TextData.calculate_builtin_embeddings` function after
      the creation of the TextData object.
      For more on embeddings, see the :ref:`Text Embeddings Guide <nlp__embeddings_guide>`
docstr: Return the text sample at the original index.
  
  Parameters
  ----------
  index : int
      Original index of the text sample.
  
  Returns
  -------
  str
     Text sample at the original index.
docstr_tok: ["Return","the","text","sample","at","the","original","index",".","Parameters","--","--","--","--","--","index",":","int","Original","index","of","the","text","sample",".","Returns","--","--","--","-","str","Text","sample","at","the","original","index","."]
code: def get_sample_at_original_index(self, index: int) -> str:
      """Return the text sample at the original index.
  
      Parameters
      ----------
      index : int
          Original index of the text sample.
  
      Returns
      -------
      str
         Text sample at the original index.
      """
      locations_in_array = np.where(self._original_text_index == index)
      if len(locations_in_array) == 0:
          raise DeepchecksValueError(
              "Original text index is not in sampled TextData object"
          )
      elif len(locations_in_array) > 1:
          raise DeepchecksValueError(
              "Original text index is not unique in sampled TextData object"
          )
      return self._text[int(locations_in_array[0])]
  
imports: import contextlib
  import pathlib
  import typing
  import warnings
  from numbers import Number
  import numpy
  import pandas
  from deepchecks.core.errors import DeepchecksNotSupportedError, DeepchecksValueError
  from deepchecks.nlp.input_validations import ColumnTypes, validate_length_and_calculate_column_types, validate_length_and_type_numpy_array, validate_modify_label, validate_raw_text, validate_tokenized_text
  from deepchecks.nlp.task_type import TaskType, TTextLabel
  from deepchecks.nlp.utils.text import break_to_lines_and_trim
  from deepchecks.nlp.utils.text_data_plot import text_data_describe_plot
  from deepchecks.nlp.utils.text_embeddings import calculate_builtin_embeddings
  from deepchecks.nlp.utils.text_properties import calculate_builtin_properties, get_builtin_properties_types
  from deepchecks.utils.logger import get_logger
  from deepchecks.utils.metrics import is_label_none
  from deepchecks.utils.validation import is_sequence_not_str
label_desc: Use image node_id 28 for calling the TextData obj's underlying member method code with example usage: obj.get_sample_at_original_index(index) and returns: self