code: def remove_punct(
      text_docs_bow: Iterable[Iterable[str]],
      replace_char: str = "",
      remove_all: bool = False,
  ) -> Iterable[Iterable[str]]:
      """Removes all punctuation from documents (e.g. periods, question marks, etc.).
  
      Args:
          text_docs_bow: A list of lists of words from a document
          replace_char: Character to replace punctuation instances with. Default is space
          remove_all: If True, removes all instances of punctuation from document. Default
              is False, which only removes leading and/or trailing instances.
  
      Returns:
          A generator expression for all of the processed documents
      """
      if remove_all:
          new_docs = (
              (re.sub(r"[^\w\s]|_", replace_char, word) for word in doc)
              for doc in text_docs_bow
          )
          return (
              (
                  word
                  for word in doc
                  if not (
                      word in string.punctuation or word.strip() == ""
                  )
              )
              for doc in new_docs
          )
      else:
          new_docs = (
              (
                  re.sub(
                      r"^([^\w\s]|_)?(.+?)([^\w\s]|_)?$", r"\2", word
                  )
                  for word in doc
              )
              for doc in text_docs_bow
          )
          return (
              (
                  word
                  for word in doc
                  if not (len(word) == 1 and word in string.punctuation)
              )
              for doc in new_docs
          )
  
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 3 for calling a global function with example usage: remove_punct(text_docs_bow, replace_char, remove_all) and returns: unknown, unknown