def reconcile(current, desired):
    """Return sets (to_add, to_remove) indicating elements that should be
    added to or removed from ``current`` to produce ``desired``.

    """

    to_remove = current - desired
    to_add = desired - current

    return to_add, to_remove