code: def chunk_and_finalize(arrays, args, encoder):
      sequences = list(arrays_to_sequences(arrays))
  
      full_seqs, trailing_data = sequences[:-1], sequences[-1]
  
      if args.min_unique_tokens > 0:
          full_seqs = list(
              enforce_min_unique(
                  full_seqs,
                  args.min_unique_tokens,
                  encoder,
                  args.verbose,
              )
          )
  
      if not args.preserve_data_order:
          random.shuffle(full_seqs)
  
      return full_seqs, trailing_data
  
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 14 for calling a global function with example usage: chunk_and_finalize(arrays, args, encoder) and returns: full_seqs,  trailing_data