<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_session_end(self, session):
 """Triggered by the given session object when the session is about to close normally. in session of type :class:`ISession` Session that is being closed return progress of type :class:`IProgress` Used to wait until the corresponding machine is actually dissociated from the given session on the server. Returned only when this session is a direct one. """

        if not isinstance(session, ISession):
            raise TypeError("session can only be an instance of type ISession")
        progress = self._call("onSessionEnd",
                     in_p=[session])
        progress = IProgress(progress)
        return progress