def calc_probability(col_dict):
    """
    This function calculates probability of each item in the dictionary
    For example, {'item1':10,'item2':30} gives  prob = {'item1': 0.25, 'item2': 0.75}
    """
    s = sum(col_dict.values())
    for key, val in col_dict.items():
        col_dict[key] = val / s
    return col_dict