Solved by googlebot in post #2 
              
              
                If that’s coding question - you derive a class from Distribution abstract class and implement some methods of its interface. Just look at source code of some distribution and write yours similarly. 
If you ask about .[r]sample(), that has to be implemented manually, normally that is either some tran…