merges b into a

def merge_dict(to_update: dict, other_dict: dict):
    """ merges b into a """
    for key, value in other_dict.items():
        has_map = (
            isinstance(value, collections.Mapping) and
            isinstance(to_update.get(key, None), collections.Mapping)
        )

        if has_map:
            merge_dict(to_update[key], value)
        else:
            to_update[key] = value