code: def do_exit(self, arg):
          
  
          if self.current:
              self.current.close()
          self.resource_manager.close()
          del self.resource_manager
          return True
docs: Exit the shell session.