def alias_diff(refcounts_before, refcounts_after):
    """
    Given the before and after copies of refcounts works out which aliases
    have been added to the after copy.
    """
    return set(t for t in refcounts_after
               if refcounts_after[t] > refcounts_before.get(t, 0))