code: def divide(elements, by, translate=False, sep=' '):
      
      outer_spans = [spans(elem) for elem in by]
      return divide_by_spans(elements, outer_spans, translate=translate, sep=sep)
docs: Divide lists `elements` and `by`.
      All elements are grouped into N bins, where N denotes the elements in `by` list.
  
      Parameters
      ----------
      elements: list of dict
          Elements to be grouped into bins.
      by: list of dict
          Elements defining the bins.
      translate: bool (default: False)
          When dividing, also translate start and end positions of elements.
      sep: str (default ' ')
          In case of multispans, what is the default text separator.
          This is required in order to tag correct start, end positions of elements.