code: def is_text_column(data: pd.Series) -> bool:
      """
      Identify if a column is one text column.
  
      Parameters
      ----------
      data
          One column of a multimodal pd.DataFrame for training.
  
      Returns
      -------
      Whether the column is a text column.
      """
      if len(data) > 5000:
          # Sample to speed-up type inference
          data = data.sample(n=5000, random_state=0)
      try:
          data_unique = data.unique()
          num_unique = len(data_unique)
          num_rows = len(data)
          unique_ratio = num_unique / num_rows
          if unique_ratio <= 0.01:
              return False
          try:
              avg_words = (
                  pd.Series(data_unique).str.split().str.len().mean()
              )
          except AttributeError:
              return False
          if avg_words < 3:
              return False
      except:
          return False
      return True
  
imports: import collections
  import json
  import logging
  import warnings
  from io import BytesIO
  from typing import Dict, List, Optional, Tuple, Union
  import pandas
  import PIL
  import pytesseract
  from autogluon.core.utils import infer_problem_type
  from ..constants import BINARY, CATEGORICAL, CLASSIFICATION, DOCUMENT_IMAGE, DOCUMENT_PDF, IDENTIFIER, IMAGE, IMAGE_BYTEARRAY, IMAGE_PATH, MULTICLASS, NER, NER_ANNOTATION, NULL, NUMERICAL, OBJECT_DETECTION, OPEN_VOCABULARY_OBJECT_DETECTION, REGRESSION, ROIS, SEMANTIC_SEGMENTATION, SEMANTIC_SEGMENTATION_GT, SEMANTIC_SEGMENTATION_IMG, TEXT, TEXT_NER
  from .utils import is_rois_input
label_desc: Use image node_id 7 for calling a global function with example usage: is_text_column(data) and returns: True, False, False, False, False