def deepupdate(original, update):
    """
    Recursively update a dict.
    Subdict's won't be overwritten but also updated.
    :param update:
    :param original:
    """
    for key, value in original.items():
        if key not in update:
            update[key] = value
        elif isinstance(value, dict):
            deepupdate(value, update[key])
    return update
dataset/ETHPy150Open sky-shiny/smolder/charcoal/charcoal.py/deepupdate/original