def format_diff(differ, diff):
    """
    Formats the given differ and diff for mongo storage.

    :param differ: the differ object
    :param diff: the diff
    :return: a dict for storage
    """
    return {u'id': differ.differ_id, u'd': diff}