code: def load_text_files(
      corpus_path, truncate_len=None, clean=True, return_fnames=False
  ):
      """
      ```
      load text files
      ```
      """
  
      texts = []
      filenames = []
      mb = master_bar(range(1))
      for i in mb:
          for filename in progress_bar(
              list(extract_filenames(corpus_path)), parent=mb
          ):
              with open(filename, "r") as f:
                  text = f.read()
              if clean:
                  text = strip_control_characters(text)
                  text = to_ascii(text)
              if truncate_len is not None:
                  text = " ".join(text.split()[:truncate_len])
              texts.append(text)
              filenames.append(filename)
          mb.write("done.")
      if return_fnames:
          return (texts, filenames)
      else:
          return texts
  
imports: from subprocess import DEVNULL, PIPE, Popen
  from ..imports import *
label_desc: Use image node_id 10 for calling a global function with example usage: load_text_files(corpus_path, truncate_len, clean, return_fnames) and returns: texts,  filenames, texts