hist {'a': 2, 'b': 1}
your function should return 'a' with probability 2/3 and 'b' with probability 1/3.