<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _split_span(self, span, index, length=0):
 """Split a span into two or three separate spans at certain indices."""

        offset = span[1] + index if index < 0 else span[0] + index
        # log.debug([(span[0], offset), (offset, offset + length), (offset + length, span[1])])
        return [(span[0], offset), (offset, offset + length), (offset + length, span[1])]