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