def get_id(self, symbol):
    """Get the numeric id of a symbol.

    This assumes that either the symbol has been inserted in the
    past - ie that self.has_id(symbol) succeeds - or that the
    symbol table has been frozen.

    Args:
      symbol: string name of symbol.

    Returns:
      integer id for the symbol (or the id for the unknown_marker)

    Raises:
      KeyError if the symbol does not map onto an id.
    """
    if self._frozen:
      return self._id_dict.get(symbol, self._unk)
    else:
      return self._id_dict[symbol]
Get the numeric id of a symbol.

    This assumes that either the symbol has been inserted in the
    past - ie that self.has_id(symbol) succeeds - or that the
    symbol table has been frozen.

    Args:
      symbol: string name of symbol.

    Returns:
      integer id for the symbol (or the id for the unknown_marker)

    Raises:
      KeyError if the symbol does not map onto an id.
    
language/nql/nql/symbol.py