def _loose_keys_ordered(self):
        loose_counts = sorted(self.counts_loose.items(), key=lambda x: x[1],
                              reverse=True)
        keys = np.array(loose_counts)[:, 0]
        counts = np.array(loose_counts)[:, 1]
        order = np.argsort(counts)[::-1].astype('int32')
        keys, counts = keys[order], counts[order]
        # Add in the specials as a prefix to the other keys
        specials = np.sort(self.specials.values())
        keys = np.concatenate((specials, keys))
        empty = np.zeros(len(specials), dtype='int32')
        counts = np.concatenate((empty, counts))
        n_keys = keys.shape[0]
        assert counts.min() >= 0
        return keys, counts, n_keys
Create a temporary directory and remove it at exit
dataset/ETHPy150Open cemoody/lda2vec/lda2vec/corpus.py/Corpus._loose_keys_ordered--crossover with--dataset/ETHPy150Open winpython/winpython/winpython/utils.py/_create_temp_dir