def close(self):
        """closes (terminates) the SSH tunnel"""
        if not self.is_open():
            return
        self.proc.stdin.write(BYTES_LITERAL("foo\n\n\n"))
        self.proc.stdin.close()
        self.proc.stdout.close()
        self.proc.stderr.close()
        try:
            self.proc.kill()
        except __HOLE__:
            if signal:
                os.kill(self.proc.pid, signal.SIGTERM)
        self.proc.wait()
        self.proc = None
dataset/ETHPy150Open sccn/SNAP/src/rpyc/utils/ssh.py/SshTunnel.close