def _translate_keys(cons):
 pool = cons['pool']
 info = {'id': cons['id'], 'console_type': pool['console_type']}
 return dict(console=info)

def _translate_keys ( cons ) : pool = cons [ 'pool' ] info = { 'id' : cons [ 'id' ] , 'console_type' : pool [ 'console_type' ] } return dict ( console = info )
coerces a console instance into proper dictionary format .