docs: def _paste_tokens_line_by_line(tokens, token_type, begin, end):
      """Return lines of tokens pasted together, line by line."""
      block_index = begin
  
      while block_index < end:
          rst_line = tokens[block_index].line
          line_traversal_index = block_index
          pasted = ""
          try:
              while tokens[line_traversal_index].line == rst_line:
                  pasted += tokens[line_traversal_index].content
                  line_traversal_index += 1
          except IndexError:
              assert line_traversal_index == end
  
          last_tokens_len = len(tokens)
          tokens = _replace_token_range(tokens,
                                        block_index,
                                        line_traversal_index,
                                        [Token(type=token_type,
                                               content=pasted,
                                               line=tokens[block_index].line,
                                               col=tokens[block_index].col)])
          end -= last_tokens_len - len(tokens)
          block_index += 1
  
      return (block_index, len(tokens), tokens)