def __init__(self, mapping: dict[str, str]):
        """Initializer.

        Args:
            mapping: User defined mapping of names. Keys are the original names of the
                identifiers, and corresponding values are the replacements.
                Both keys and values have to represent valid Python identifiers:
                ^[A-Za-z_][A-Za-z0-9_]*$
        """
        self._mapping = mapping

        for k, v in self._mapping.items():
            if not str.isidentifier(k) or keyword.iskeyword(k):
                raise ValueError(f"'{k}' is not an identifier name.")
            if not str.isidentifier(v) or keyword.iskeyword(v):
                raise ValueError(f"'{v}' is not an identifier name.")
Initializer.

        Args:
            mapping: User defined mapping of names. Keys are the original names of the
                identifiers, and corresponding values are the replacements.
                Both keys and values have to represent valid Python identifiers:
                ^[A-Za-z_][A-Za-z0-9_]*$
        
src/latexify/transformers/identifier_replacer.py