class_docstr: Checks for duplicate samples in the dataset.
  
  Parameters
  ----------
  {text_normalization_params:1*indent}
  n_to_show : int, default: 5
      number of most common duplicated samples to show.
  n_samples : int, default: 10_000_000
      number of samples to use for this check.
  random_state : int, default: 42
      random seed for all check internals.
  {max_text_length_for_display_param:1*indent}
class_docstr_tok: ["Checks","for","duplicate","samples","in","the","dataset",".","Parameters","--","--","--","--","--","{","text_normalization_params:1","*","indent","}","n_to_show",":","int",",","default",":","5","number","of","most","common","duplicated","samples","to","show",".","n_samples",":","int",",","default",":","10_000_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","42","random","seed","for","all","check","internals",".","{","max_text_length_for_display_param:1","*","indent","}"]
code: def _truncate_text(self, x: str) -> str:
      return truncate_string(x, self.max_text_length_for_display)
  
file_path: deepchecks/deepchecks/nlp/checks/data_integrity/text_duplicates.py
imports: import typing
  import pandas
  from deepchecks.core import CheckResult
  from deepchecks.nlp import Context, SingleDatasetCheck
  from deepchecks.nlp._shared_docs import docstrings
  from deepchecks.nlp.text_data import TextData
  from deepchecks.nlp.utils.text import cut_string, hash_samples, normalize_samples
  from deepchecks.utils.abstracts.data_duplicates import DataDuplicatesAbstract
  from deepchecks.utils.dataframes import hide_index_for_display
  from deepchecks.utils.other import to_ordional_enumeration
  from deepchecks.utils.strings import format_list, format_percent, truncate_string
label_desc: Use image node_id 3 for calling the TextDuplicates obj's underlying member method code with example usage: obj._truncate_text(x) and returns: truncate_string