def METHOD_NAME(self, dir_fn: str) -> bytes:
    with tempfile.TemporaryDirectory() as tmp_path:
        tmp_path = os.path.join(tmp_path, 'tmp.wan')
        AsyncTaskDelegator.run_task(self._run_gfxcrunch([dir_fn, tmp_path]))
        self._run_window()
        if self.status == GfxcrunchStatus.SUCCESS:
            with open(tmp_path, 'rb') as f:
                return f.read()
        else:
            raise make_user_err(RuntimeError, _("The gfxcrunch process failed."))