def slice_text(text,
               eos_token="<s>",
               sos_token="</s>"):
  """Slices text from <s> to </s>, not including
  these special tokens.
  """
  eos_index = text.find(eos_token)
  text = text[:eos_index] if eos_index > -1 else text
  sos_index = text.find(sos_token)
  text = text[sos_index+len(sos_token):] if sos_index > -1 else text
  return text.strip()