def METHOD_NAME(self, path, value):
    key, delimiter, rest_path = path.partition('__')
    existing = Struct.get(self, key)
    if value is EMPTY:
        value = Namespace()
    if delimiter:
        if isinstance(existing, dict):
            type_of_namespace = _get_type_of_namespace(existing)
            self[key] = type_of_namespace(existing, {rest_path: value})
        elif callable(existing):
            self[key] = Namespace(dict(call_target=existing), {rest_path: value})
        else:
            # Unable to promote to Namespace, just overwrite
            self[key] = Namespace({rest_path: value})
    else:
        if existing is None:
            # This is a common case and checking for None is fast
            self[key] = value
        elif getattr(existing, 'shortcut', False):
            # Avoid merging Shortcuts
            self[key] = value
        elif isinstance(existing, dict):
            type_of_namespace = _get_type_of_namespace(existing)
            if isinstance(value, dict):
                self[key] = type_of_namespace(existing, value)
            elif callable(value):
                self[key] = type_of_namespace(existing, call_target=value)
            else:
                # Unable to promote to Namespace, just overwrite
                self[key] = value
        elif callable(existing):
            if isinstance(value, dict):
                type_of_namespace = _get_type_of_namespace(value)
                self[key] = type_of_namespace(dict(call_target=existing), value)
            else:
                self[key] = value
        else:
            self[key] = value