#NEWLINE# @ lower ( 'random.paretovariate' , types . Float ) #NEWLINE# def paretovariate_impl( context , builder , sig , args ) : #NEWLINE# #INDENT# _random = random . random #NEWLINE# def paretovariate_impl( alpha ) : #NEWLINE# #INDENT# 'Pareto distribution.  Taken from CPython.' #NEWLINE# u = ( 1.0 - _random ( ) ) #NEWLINE# return ( 1.0 / ( u ** ( 1.0 / alpha ) ) ) #NEWLINE# #UNINDENT# res = context . compile_internal ( builder , res , sig , args ) #NEWLINE# return impl_ret_untracked ( context , builder , sig . return_type , res )