import re


def convert_chunk_markers(str):
    """
    Replaces \ts chunk markers to \s5 for backwards compatibility with the legacy tS api
    :param str:
    :return: the converted string
    """
    return re.sub(r'\\ts\b', '\n\\s5', str)