Divides the given path at the boundaries of the given spans, subdividing individual path
segments when a span's boundary falls in the middle. Sections of the path not included in one
of the given spans will be returned with null as its segment.
S - The type of PositionSpan used to segment the path. The declared type of the spans returned
will be the same as the spans given.
shape - Shape to segment.
spans - Spans used to segment the path.
A list of sections of the given path, paired with the section's corresponding span,