def logged_dict_update(log_func, left, right):
    """Update a dict with any changes tracked via `log_func`."""
    for k, v in right.items():
        if k in left and left[k] != v:
            log_func(
                    f"entry changed"
                    f" {k} {left[k]} -> {v}")
        left[k] = v
    return left