code: def get_text_generator(
      alphabet=None, lowercase=False, max_string_length=None
  ):
      """Generates strings of sentences using only the letters in alphabet.
  
      Args:
          alphabet: The alphabet of permitted characters
          lowercase: Whether to convert all strings to lowercase.
          max_string_length: The maximum length of the string
      """
      gen = essential_generators.DocumentGenerator()
      while True:
          sentence = gen.sentence()
          if lowercase:
              sentence = sentence.lower()
          sentence = "".join(
              [
                  s
                  for s in sentence
                  if (alphabet is None or s in alphabet)
              ]
          )
          if max_string_length is not None:
              sentence = sentence[:max_string_length]
          yield sentence
  
imports: import os
  import math
  import glob
  import typing
  import random
  import zipfile
  import string
  import itertools
  import cv2
  import tqdm
  import numpy
  import essential_generators
  import PIL.Image
  import PIL.ImageDraw
  import PIL.ImageFont
  import fontTools.ttLib
  from .None import tools
label_desc: Use image node_id 4 for calling a global function with example usage: get_text_generator(alphabet, lowercase, max_string_length) without return types