code: def join_texts(texts, sorted_by="left", glue=" ", strip=True):
      """Join strings in text boxes <texts>, sorting them by <sorted_by> and concatenating them using <glue>."""
      if sorted_by:
          texts = sorted_by_attr(texts, sorted_by)
  
      s = glue.join([t["value"] for t in texts])
      if strip:
          s = s.strip()
      return s
  
file_path: pdftabextract/pdftabextract/textboxes.py
imports: import math
  import numpy
  from pdftabextract.common import update_text_dict_pos, sorted_by_attr, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL, SKEW_X, SKEW_Y
  from pdftabextract.geom import pt, vecrotate
label_desc: Use image node_id 4 for calling a global function with example usage: join_texts(texts, sorted_by, glue, strip) and returns: s