@staticmethod
def _around_spans(s, spans):
    """Given a string and spans, return the string around the spans"""
    i = 0
    for start, end in spans:
        if i < start:
            yield s[i:start]
            i = start
        if i < end:
            i = end
    yield s[i:len(s)]
