code: def _get_transport(self):
          
          if self.ssh_proxy:
              if isinstance(self.ssh_proxy, paramiko.proxy.ProxyCommand):
                  proxy_repr = repr(self.ssh_proxy.cmd[1])
              else:
                  proxy_repr = repr(self.ssh_proxy)
              self.logger.debug('Connecting via proxy: {0}'.format(proxy_repr))
              _socket = self.ssh_proxy
          else:
              _socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          if isinstance(_socket, socket.socket):
              _socket.settimeout(SSH_TIMEOUT)
              _socket.connect((self.ssh_host, self.ssh_port))
          transport = paramiko.Transport(_socket)
          transport.set_keepalive(self.set_keepalive)
          transport.use_compression(compress=self.compression)
          transport.daemon = self.daemon_transport
  
          return transport
docs: Return the SSH transport to the remote gateway