code: def text_preprocessing(combined, text_cols):
      nltk_downloads()
      lemmatizer = WordNetLemmatizer()
      # combined = pd.concat([data['train'], data['test']], axis=0)
  
      spell = Speller(fast=True)
      for col in text_cols:
          combined[col] = combined[col].apply(
              lambda x: x.lower() if isinstance(x, str) else x
          )
  
      stop_words = set(stopwords.words("english"))
  
      for col in text_cols:
          preprocessed_text = []
          for words in combined[col]:
              if words is not np.nan:
                  words = word_tokenize(words)
                  words = [word for word in words if word.isalpha()]
                  words = [
                      word for word in words if word not in stop_words
                  ]
                  words = [spell(word) for word in words]
                  words = [lemmatizer.lemmatize(word) for word in words]
  
                  preprocessed_text.append(" ".join(words))
  
              else:
                  preprocessed_text.append(np.nan)
  
          combined[col] = preprocessed_text
  
      return combined
  
imports: from pandas.api.types import is_numeric_dtype
  import numpy
  import pandas
  from sklearn.compose import ColumnTransformer
  from sklearn.feature_extraction.text import TfidfVectorizer
  from sklearn.pipeline import Pipeline
  from nltk.stem import WordNetLemmatizer
  from nltk.tokenize import word_tokenize
  from nltk.corpus import stopwords
  from autocorrect import Speller
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.preprocessing import OrdinalEncoder
  from sklearn.impute import SimpleImputer
  from sklearn.ensemble import RandomForestRegressor
  from nylon.preprocessing.preprocessing import process_dates
  from sklearn.preprocessing import OneHotEncoder, StandardScaler, FunctionTransformer, LabelEncoder
label_desc: Use image node_id 11 for calling a global function with example usage: text_preprocessing(combined, text_cols) and returns: combined