code: def perplexity(self):
  
          
  
          return samplers_lda.perplexity_comp(self.docid, self.tokens,
                                              self.tt, self.dt, self.N,
                                              self.K, self.samples)
docs: Compute perplexity for each sample.