import torch


def make_observation_mapper(claims):
    """Make a dictionary of observation.

    Parameters
    ----------
    claims: pd.DataFrame
       
    Returns
    -------
    observation_mapper: dict
        an dictionary that map rv to their observed value
    """
    observation_mapper = dict()
    for c in claims.index:
        s = claims.iloc[c]['source_id']
        observation_mapper[f'b_{s}_{c}'] = torch.tensor(
            claims.iloc[c]['value'])
    return observation_mapper