sample from discrete distribution python