':key: éæåœæ°,å€é¡¹åŒååžæœæ ·,æ­€æ¶äŒæ¹åpro_listçåŒ
:param pro_list: [0.2, 0.7, 0.4, 0.1],æ­€æ¶è¯Žæè¿åäžæ 1çå¯èœæ§å€§,äœä¹äžç»å¯¹'

@staticmethod
def multinomial_sample(pro_list):

    for k in range(1, len(pro_list)):
        pro_list[k] += pro_list[(k - 1)]
    u = (numpy.random.rand() * pro_list[(-1)])
    return_index = (len(pro_list) - 1)
    for t in range(len(pro_list)):
        if (pro_list[t] > u):
            return_index = t
            break
    return return_index
