code: def texts_from_folder(preprocess_mode="standard"):
      DATADIR = os.path.join(CURRDIR, "resources/text_data/text_folder")
      trn, val, preproc = txt.texts_from_folder(
          DATADIR,
          max_features=100,
          maxlen=10,
          ngram_range=3,
          classes=["pos", "neg"],
          train_test_names=["train", "test"],
          preprocess_mode=preprocess_mode,
      )
  
      return (trn, val, preproc)
  
imports: import os.path
  from unittest import TestCase, main, skip
  import testenv
  import ktrain
  from ktrain import text
  from ktrain import utils
  from ktrain import vision
label_desc: Use image node_id 1 for calling a global function with example usage: texts_from_folder(preprocess_mode) and returns: trn,  val,  preproc