import re


def _convert_tnt_treeline(line: str) -> str:
    """
    Prepare TNT-tree line
    Args:
        line: str, a row or line from TNT-tree file

    Returns: str
    """
    line = line.strip().strip(";")
    line = line.replace(".", "_")
    line = re.sub(r"([\w|\d])\s([\w|(])", r"\1, \2", line)
    line = re.sub(r"\)\(", r"), (", line)
    return line