code: def _strip_line(line):
      """Modify a line so that spaces are excluded."""
      first_character_index = next(
          (
              index
              for index, (box, character) in enumerate(line)
              if not character.isspace()
          ),
          None,
      )
      if first_character_index is None:
          return []
      last_character_index = len(line) - next(
          index
          for index, (box, character) in enumerate(reversed(line))
          if not character.isspace()
      )
      return line[first_character_index:last_character_index]
  
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 5 for calling a global function with example usage: _strip_line(line) and returns: line, list