def METHOD_NAME(self, ofile):
    try:
        tmpdir = tempfile.mkdtemp()
        with zipfile.ZipFile(ofile, 'w') as nnpzip:
            self._export_files(tmpdir)
            for f in glob.glob('{}/*'.format(tmpdir)):
                nnpzip.write(f, os.path.basename(f))
    finally:
        shutil.rmtree(tmpdir)