code: def read_files_to_tokenized_docs(files, args, encoder):
      docs = []
  
      if args.preserve_data_order:
          files = sorted(files)
      else:
          random.shuffle(files)
  
      for f in tqdm(
          files,
          mininterval=10,
          smoothing=0,
          desc="reading/tokenizing files",
      ):
          docs.extend(
              file_to_tokenized_docs_generator(f, encoder, args)
          )
  
      if not args.preserve_data_order:
          # shuffle at individual document level
          random.shuffle(docs)
  
      return docs
  
imports: import argparse
  import os
  import re
  import random
  from pathlib import Path
  from typing import List
  import ftfy
  import tensorflow
  from lm_dataformat import Reader
  from transformers import GPT2TokenizerFast
  from tqdm import tqdm
label_desc: Use image node_id 12 for calling a global function with example usage: read_files_to_tokenized_docs(files, args, encoder) and returns: docs