class_docstr: Vose's Alias Method.
      
docstr: Generate samples from given distribution.
          
docstr_tok: ["Generate","samples","from","given","distribution","."]
code: def generate(self):
      """Generate samples from given distribution."""
      dart1 = rand_k(self.size())
      dart2 = int(rand())
      return (
          dart1 if dart2 > self.__prob[dart1] else self.__alias[dart1]
      )
  
file_path: PaddleHub/modules/text/language_model/lda_news/vose_alias.py
imports: import numpy
  from lda_news.util import rand, rand_k
label_desc: Use image node_id 3 for calling the VoseAlias obj's underlying member method code with example usage: obj.generate() and returns: unknown