def on_expiration(self, session, expired_session_exception=None,<EOL>session_key=None):
if (expired_session_exception and session_key):<EOL><INDENT>try:<EOL><INDENT>self.on_change(session)<EOL>msg = "<STR_LIT>".format(session.session_id)<EOL>logger.debug(msg)<EOL>identifiers = session.get_internal_attribute('<STR_LIT>')<EOL>mysession = session_tuple(identifiers, session_key.session_id)<EOL>self.notify_event(mysession, '<STR_LIT>')<EOL><DEDENT>except:<EOL><INDENT>raise<EOL><DEDENT>finally:<EOL><INDENT>self.after_expired(session)<EOL><DEDENT><DEDENT>elif not expired_session_exception and not session_key:<EOL><INDENT>self.on_change(session)<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg)<EOL><DEDENT>
This method overloaded for now (java port).  TBD
Two possible scenarios supported:
    1) All three arguments passed = session + ese + session_key
    2) Only session passed as an argument