def getstate(self):
        """
        Merge projections from across all workers and return the final projection.
        """
        logger.info("end of input, assigning all remaining jobs")
        logger.debug("jobs done: %s, jobs received: %s" % (self._jobsdone, self._jobsreceived))
        while self._jobsdone < self._jobsreceived:
            time.sleep(0.5) # check every half a second

        # TODO: merge in parallel, so that we're done in `log_2(workers)` merges,
        # and not `workers - 1` merges!
        # but merging only takes place once, after all input data has been processed,
        # so the overall effect would be small... compared to the amount of coding :-)
        logger.info(len(self.workers) % "merging states from %i workers")
        workers = self.workers.items()
        result = workers[0][1].getstate()
        for workerid, worker in workers[1:]:
            logger.info("pulling state from worker %s" % workerid)
            result.merge(worker.getstate())
        logger.info("sending out merged projection")
        return result
dataset/ETHPy150Open largelymfs/topical_word_embeddings/TWE-1/gensim/models/lsi_dispatcher.py/Dispatcher.getstate/swapped operands of `%`