Merge dict b into a

def merge_dict(a, b, path=None):
    """
    Merge dict b into a
    """
    if not path:
        path = []
    for key in b:
        if key in a:
            if isinstance(a[key], dict) and isinstance(b[key], dict):
                merge_dict(a[key], b[key], path + [str(key)])
            else:
                continue
        else:
            a[key] = b[key]
    return a