def merge_configs(*configs):
    """
    Merges dictionaries of dictionaries, by combining top-level dictionaries with last value taking
    precedence.

    For example:
    >>> merge_configs({'a': {'b': 1, 'c': 2}}, {'a': {'b': 2, 'd': 3}})
    {'a': {'b': 2, 'c': 2, 'd': 3}}
    """
    merged_config = {}
    for config in configs:
        for k, v in config.items():
            if k in merged_config:
                merged_config[k].update(v)
            else:
                merged_config[k] = v.copy()
    return merged_config