code: function getSpanBoundaries(node) {
    const allSpans = getAllChildSpans(node).concat(node.spans || []);
    if (allSpans.length > 0) {
      const firstSpan = allSpans[0];
      return allSpans.reduce((boundaries, span) => {
        if (boundaries.start > span.start) {
          boundaries.start = span.start;
        }
        if (boundaries.end < span.end) {
          boundaries.end = span.end;
        }
        return boundaries;
      }, { start: firstSpan.start, end: firstSpan.end });
    } else {
      return undefined;
    }
  }
docs: Returns a single span where the the start / end values encompass the indices of the provided
  node's spans and all of it's children's spans.
  
  For instance, if provided a node with the span [0, 1] and that node had two children,
  [1, 3] and [4, 20], this function would return a single span, [0, 20].
  
  If the node or it's children don't have any spans, `undefined` is returned.
  
  @param  {Node}
  @return {Span|undefined} The encompassing span (the boundaries), or undefined.