def swap(self, old_chunks, new_chunk):
indexes = [self.index(chunk) for chunk in old_chunks]<EOL>del self[indexes[<NUM_LIT:0>]:indexes[-<NUM_LIT:1>] + <NUM_LIT:1>]<EOL>self.insert(indexes[<NUM_LIT:0>], new_chunk)<EOL>
Swaps old consecutive chunks with new chunk.

        Args:
          old_chunks (:obj:`budou.chunk.ChunkList`): List of consecutive Chunks to
              be removed.
          new_chunk (:obj:`budou.chunk.Chunk`): A Chunk to be inserted.