def _dict_merge(dct, merge_dct):
for k, v in merge_dct.items():<EOL><INDENT>if (k in dct and isinstance(dct[k], dict)<EOL>and isinstance(merge_dct[k], collections.Mapping)):<EOL><INDENT>_dict_merge(dct[k], merge_dct[k])<EOL><DEDENT>else:<EOL><INDENT>dct[k] = merge_dct[k]<EOL><DEDENT><DEDENT>
Recursive dict merge.

    Inspired by :meth:``dict.update()``, instead of updating only top-level
    keys, dict_merge recurses down into dicts nested to an arbitrary depth,
    updating keys. The ``merge_dct`` is merged into ``dct``.

    From https://gist.github.com/angstwad/bf22d1822c38a92ec0a9

    Arguments:
        dct: dict onto which the merge is executed
        merge_dct: dct merged into dct