<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_symbol(self, symbol):
 """ Get a specific symbol by index or name. Args: symbol(int or str):
 The index or name of the symbol to return. Returns: ELF.Symbol: The symbol. Raises: KeyError: The requested symbol does not exist. """


        self._ensure_symbols_loaded()
        if type(symbol) is int:
            return self._symbols_by_index[symbol]
        else:
            return self._symbols_by_name[symbol]