def error_code_to_exception(error_code: int):
<EOL>return RpcParseError.lookup_table[error_code]<EOL>
Translates a given error code to the corresponding exception.

Parameters
----------
error_code : int
    A valid RPC error code.

Returns
-------
    One of the RpcError exception classes defined in this file.

Raises
------
KeyError
    When the given ``error_code`` does not correspond to any
    known RPC exception.