def get_authenticated_agent_id_with_proxy(proxy):
if is_authenticated_with_proxy(proxy):<EOL><INDENT>return proxy.get_authentication().get_agent_id()<EOL><DEDENT>else:<EOL><INDENT>raise IllegalState()<EOL><DEDENT>
Given a Proxy, returns the Id of the authenticated Agent