@allow_from_sudo()
    def cleanup_at_exit(self):
        if self.sudo_proxy is not None:
            self.keep_sudo_proxy_alive = True
            return self.sudo_proxy.cleanup_at_exit()
        if not getattr(sys, "frozen", False):
            exe = [sys.executable, "-c",
                   "import esky; esky.run_startup_hooks()",
                   "--esky-spawn-cleanup"]
        else:
            exe = sys.executable
            #  Try to re-launch the best available version, so that
            #  the currently in-use version can be cleaned up.
            if self.active_version is not None:
                vsdir = self._get_versions_dir()
                bestver = get_best_version(vsdir,
                                           include_partial_installs=True)
                if bestver is not None:
                    (_, version, _) = split_app_version(bestver)
                    if self.active_version != version:
                        if self.active_version in exe:
                            exe = exe.replace(self.active_version, version)
                            if not os.path.isfile(exe):
                                exe = sys.executable
            if os.path.basename(exe).lower() in ("python", "pythonw"):
                exe = [exe, "-c", "import esky; esky.run_startup_hooks()",
                       "--esky-spawn-cleanup"]
            else:
                if not _startup_hooks_were_run:
                    raise OSError(None,
                                  "unable to cleanup: startup hooks not run")
                exe = [exe, "--esky-spawn-cleanup"]
        appdata = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
        exe = exe + [base64.b64encode(appdata).decode("ascii")]

        @atexit.register
        def spawn_cleanup():
            rnul = open(os.devnull, "r")
            wnul = open(os.devnull, "w")
            if sys.platform == "win32":
                if sys.hexversion >= 0x02060000:
                    kwds = dict(close_fds=True)
                else:
                    kwds = {}
            else:
                kwds = dict(stdin=rnul, stdout=wnul, stderr=wnul,
                            close_fds=True)
            subprocess.Popen(exe, **kwds)
Reverses the coordinate order of the geometry, and attaches as a
dataset/ETHPy150Open cloudmatrix/esky/esky/__init__.py/Esky.cleanup_at_exit--crossover with--dataset/ETHPy150Open django/django/django/contrib/gis/db/models/query.py/GeoQuerySet.reverse_geom