from typing import List
import re


def _split_tuples(line: str) -> List[str]:
    """
    Split an INSERT INTO statement into a list of strings each
    representing a SQL table row.

    :param line: An INSERT INTO statement, e.g. "INSERT INTO `change_tag_def`
        VALUES (1,'mw-replace',0,10200),(2,'visualeditor',0,305860);"
    :type line: str
    :return: A list with items representing SQL rows,
        e.g. ["1,'mw-replace',0,10200", "2,'visualeditor',0,305860"]
    :rtype: List[str]
    """

    tuples = line.partition(" VALUES ")[-1].strip()
    # Sub NULL with the empty string
    pattern = r"(?<=[,(])NULL(?=[,)])"
    values = re.sub(pattern, "", tuples)
    # Remove `;` at the end of the last `INSERT INTO` statement
    if values[-1] == ";":
        values = values[:-1]
    records = re.split(r"\),\(", values[1:-1])  # Strip `(` and `)`

    return records