def add_obs_prob_to_dict(dictionary, obs, prob):
    """
    Updates a dictionary that tracks a probability distribution over observations.
    """
    obs_str = obs.tostring()
    if obs_str not in dictionary:
        dictionary[obs_str] = 0
    dictionary[obs_str] += prob
    return dictionary