def difference_update(d: dict, remove) -> dict:
    """Change and return d.
    d: mutable mapping, remove: iterable.
    There is such a method for sets, but unfortunately not for dicts.

    >>> d = {'a': 1, 'b': 2, 'c': 3}
    >>> remove = ('b', 'outlier')
    >>> d_altered = difference_update(d, remove)
    >>> d_altered is d
    True
    >>> d == {'a': 1, 'c': 3}
    True
    """
    for k in remove:
        if k in d:
            del(d[k])
    return d    # so that we can pass a call to this fn as an arg, or chain