<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def map_exception_codes():
    '''Helper function to intialise CODES_TO_EXCEPTIONS.'''
    werkex = inspect.getmembers(exceptions, lambda x: getattr(x, 'code', None))
    return {e.code: e for _, e in werkex}