code: def cleanup(self):
          
          if self.local_port is not None:
              logger.debug(("Stopping ssh tunnel {0}:{1}:{2} for "
                            "{3}@{4}".format(self.local_port,
                                             self.remote_address,
                                             self.remote_port,
                                             self.username,
                                             self.address)))
              if self.forward is not None:
                  self.forward.stop()
                  self.forward.join()
              if self.transport is not None:
                  self.transport.close()
docs: Cleanup resources used during execution