<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_exit(self, arg):
 """Exit the shell session."""


        if self.current:
            self.current.close()
        self.resource_manager.close()
        del self.resource_manager
        return True