    def merge(self, other: "SymbolTable") -> "SymbolTable":
        """Create a union of two SymbolTables.
        Raises an AssertionError if the same IDs are occupied by
        different symbols.

        Args:
            other:
                A symbol table to merge with ``self``.

        Returns:
            A new symbol table.
        """
        self._check_compatible(other)
        return SymbolTable(
            _id2sym={**self._id2sym, **other._id2sym},
            _sym2id={**self._sym2id, **other._sym2id},
            eps=self.eps,
        )
Create a union of two SymbolTables.
Raises an AssertionError if the same IDs are occupied by
different symbols.

Args:
other:
A symbol table to merge with ``self``.

Returns:
A new symbol table.
text/symbol_table.py