code: def sentence_to_windows(sentence, min_window, max_window):
      """
      Create window size chunks from a sentence, always starting with a word
      """
      windows = []
      words = sentence.split(" ")
      curr_window = ""
      for idx, word in enumerate(words):
          curr_window += " " + word
          curr_window = curr_window.lstrip()
          next_word_len = (
              len(words[idx + 1]) + 1 if idx + 1 < len(words) else 0
          )
          if len(curr_window) + next_word_len > max_window:
              curr_window = clean_sentence(curr_window)
              if validate_sentence(curr_window, min_window):
                  windows.append(curr_window.strip())
              curr_window = ""
      if len(curr_window) >= min_window:
          windows.append(curr_window)
      return windows
  
imports: import argparse
  import json
  import logging
  import os
  import re
  import sys
  from pathlib import Path
  from random import randint, random, shuffle
  from string import digits
  from tqdm import tqdm
  from stanza.models.common.constant import treebank_to_langid
label_desc: Use image node_id 7 for calling a global function with example usage: sentence_to_windows(sentence, min_window, max_window) and returns: windows