from typing import Dict


def deep_merge(parent: Dict, child: Dict) -> Dict:
    """Deeply merge two dictionaries.

    Dictionary entries will be followed and merged, anything else will be
    replaced. If the child dictionary has overlapping values. `child` is merged
    into `parent`. The operation is in-place, but the result is still returned.
    """
    for key, value in child.items():
        parent_value = parent.get(key)
        if isinstance(parent_value, dict):
            if isinstance(value, dict):
                deep_merge(parent_value, value)
            else:
                parent[key] = value
        else:
            parent[key] = value
    return parent