def _update_partition(this: dict, other: dict):
    """ given two dicts of lists (this and other),
    extends the list of `this` with the contents of `other`
    NOTE: they must have exactly the same keys or will raise an assertion error
    NOTE: not done in place (returns a copy of the dict)
    """
    this = dict(this)
    for key in this:
        assert key in other
        assert isinstance(this[key], list)
        assert isinstance(other[key], list)

        # this[key].update(other[key])
        this[key].extend(other[key])

    return this