code: def dropSpans(spans, text):
      
      spans.sort()
      res = ''
      offset = 0
      for s, e in  spans:
          if offset <= s:         # handle nesting
              if offset < s:
                  res += text[offset:s]
              offset = e
      res += text[offset:]
      return res
docs: Drop from text the blocks identified in :param spans:, possibly nested.