def cleanup(self):
        """
        Release resources used during shell execution
        """
        for future in self.futures:
            future.cancel()
        self.executor.shutdown(wait=10)
        if self.ssh.get_transport() != None:
            self.ssh.close()
Release resources used during shell execution