TL;DR When you have a list of items, for example: [a, b, c], and you want to get, for example, a linear distribution of them with usual .random() function then simply make a number of items in that list in linear distribution: [a, b, b, c, c, c] and then get…