def train(self, n_iterations=500, verbose=1):
        if mp.cpu_count() < self.n_proc:
            raise RuntimeError("Model seeded with more cores than available." +
                               " Requires {0} cores.".format(self.n_proc))

        self._move_locals_to_globals()

        docs = split_documents(self.corpus, self.indices, self.n_proc)

        doc_indices = [(0, len(docs[0]))]
        for i in xrange(len(docs)-1):
            doc_indices.append((doc_indices[i][1],
                                doc_indices[i][1] + len(docs[i+1])))

        p = mp.Pool(self.n_proc)

	if verbose == 1:
            pbar = ProgressBar(widgets=[Percentage(), Bar()], maxval=n_iterations).start()
        
        n_iterations += self.iteration
        iteration = 0

        while self.iteration < n_iterations:
            if verbose == 2:
                stdout.write('\rIteration %d: mapping  ' % self.iteration)
                stdout.flush()
        
            data = zip(docs, doc_indices, self._mtrand_states)

            # For debugging
	    # results = map(update, data)
	    if platform.system() == 'Windows':
                raise NotImplementedError("""LdaCgsMulti is not implemented on Windows. 
                Please use LdaCgsSeq.""")
            else:
                results = p.map(update, data)

            if verbose == 2:
                stdout.write('\rIteration %d: reducing ' % self.iteration)
                stdout.flush()
            
	    if verbose == 1:
                #print("Self iteration", self.iteration)
                pbar.update(iteration)

            (Z_ls, top_doc_ls, word_top_ls, logp_ls, mtrand_str_ls, 
             mtrand_keys_ls, mtrand_pos_ls, mtrand_has_gauss_ls, 
             mtrand_cached_gaussian_ls) = zip(*results)
            
            self._mtrand_states = zip(mtrand_str_ls, mtrand_keys_ls, mtrand_pos_ls, 
                                mtrand_has_gauss_ls, mtrand_cached_gaussian_ls)

            for t in xrange(len(results)):
                start, stop = docs[t][0][0], docs[t][-1][1]
                self.Z[start:stop] = Z_ls[t]
                self.top_doc[:, doc_indices[t][0]:doc_indices[t][1]] = top_doc_ls[t]
            self.word_top = self.word_top + np.sum(word_top_ls, axis=0)
            self.inv_top_sums = 1. / self.word_top.sum(0)
            lp = np.sum(logp_ls)
            self.log_probs.append((self.iteration, lp))

            if verbose == 2:
                stdout.write('\rIteration %d: log_prob=' % self.iteration)
                stdout.flush()
                print '%f' % lp

            iteration += 1
            self.iteration += 1

        if verbose == 1:
            pbar.finish()

        p.close()
        self._move_globals_to_locals()
Takes an optional argument, `n_iterations` and updates the model
dataset/ETHPy150Open inpho/vsm/vsm/model/ldacgsmulti.py/LdaCgsMulti.train