code: def to_list(text_docs_gen) -> List[Any]:
      """Converts a generator expression from an individual preprocessing function into a list.
  
      Args:
          text_docs_gen: A generator expression for the processed text documents
  
      Returns:
          A list of processed text documents or a list of tokens (list of strings)
              for each document
      """
      if not isinstance(text_docs_gen, GeneratorType):
          return text_docs_gen
      else:
          return [to_list(i) for i in text_docs_gen]
  
imports: import re
  import string
  import warnings
  from types import GeneratorType
  from typing import List, Optional, Any, Iterable, TYPE_CHECKING
  import pandas
  from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
  from data_describe.text import text_preprocessing
  from data_describe.compat import _requires, _compat
label_desc: Use image node_id 13 for calling a global function with example usage: to_list(text_docs_gen) and returns: text_docs_gen, unknown