def trim(d, prepended_msg):
    """remove the prepended-msg from the keys of dictionary d."""
    keys = [x.split(prepended_msg)[1] for x in d.keys()]
    return {k:v for k,v in zip(keys, d.values())}