#NEWLINE# def multinomial_sample( p , k = 1 ) : #NEWLINE# #INDENT# '\n    Wrapper to generate a k samples,\n    using the MultinomialSampler class.\n    ' #NEWLINE# return MultinomialSampler ( p ) . sample ( p )