def update(current, new):
    """
    Recursively merge or update dictionaries.

    :rapam current: `dict` for update.
    :param new: `dict` updater.
    :returns: updated `dict`.
    """
    for key, value in new.items():
        if isinstance(value, dict):
            result = update(current.get(key, {}), value)
            current[key] = result
        elif new[key] is not None:
            current[key] = new[key]
    return current