parameters: (data, repl)
return_statement: return ''.join(res)
docstring: Multi-replacement of text |data| by ranges and replacement text.
  
    Args:
      data: Original text.
      repl: List of (lo, hi, s) tuples, specifying that |data[lo:hi]| should be
        replaced with |s|. The ranges must be inside |data|, and not overlap.
    Returns: New text.
docstring_summary: Multi-replacement of text |data| by ranges and replacement text.
docstring_tokens: Multi - replacement of text |data| by ranges and replacement text .
function: def _MultiReplace(data, repl):
    """Multi-replacement of text |data| by ranges and replacement text.
  
    Args:
      data: Original text.
      repl: List of (lo, hi, s) tuples, specifying that |data[lo:hi]| should be
        replaced with |s|. The ranges must be inside |data|, and not overlap.
    Returns: New text.
    """
    res = []
    prev = 0
    for (lo, hi, s) in sorted(repl):
      if prev < lo:
        res.append(data[prev:lo])
      res.append(s)
      prev = hi
    res.append(data[prev:])
    return ''.join(res)
function_tokens: def _MultiReplace ( data , repl ) : res = [ ] prev = 0 for ( lo , hi , s ) in sorted ( repl ) : if prev < lo : res . append ( data [ prev : lo ] ) res . append ( s ) prev = hi res . append ( data [ prev : ] ) return '' . join ( res )