class_docstr: Splits a list of text documents into a list of text documents with shorter texts.
  This is useful for splitting documents with long texts that otherwise would not fit into the maximum text length of language models.
docstr: Concatenates the elements into parts of split_length units.
code: def _concatenate_units(
      self, elements: List[str], split_length: int, split_overlap: int
  ) -> List[str]:
      """
      Concatenates the elements into parts of split_length units.
      """
      text_splits = []
      segments = windowed(
          elements, n=split_length, step=split_length - split_overlap
      )
      for seg in segments:
          current_units = [unit for unit in seg if unit is not None]
          txt = "".join(current_units)
          if len(txt) > 0:
              text_splits.append(txt)
      return text_splits
  
file_path: haystack/haystack/components/preprocessors/document_splitter.py
imports: from copy import deepcopy
  from typing import List, Literal
  from more_itertools import windowed
  from haystack import component, Document
label_desc: Use image node_id 4 for calling the DocumentSplitter obj's underlying member method code with example usage: obj._concatenate_units(elements, split_length, split_overlap) and returns: text_splits