def extend(base, *injects):

    for injector in injects:
        for key, value in injector.items():
            if isinstance(value, collections.Mapping):
                _ = extend(base.get(key, {}), value)
                base[key] = _
            else:
                base[key] = injector[key]
    return base
Do a recursive extension of an object.
dataset/ETHPy150Open heiskr/sagefy/server/modules/util.py/extend