def _build_template(
    sentence: str,
    start_idx: int,
    end_idx: int,
    marker: str,
) -> Tuple[str, str]:
  """Replaces a span in the text with a marker."""
  return sentence[:start_idx] + marker + sentence[end_idx:], sentence[
      start_idx:end_idx]
Replaces a span in the text with a marker.
language/wino_dict/utils.py