<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_app_scope(name, scope):
 """activate plugins accordingly to config"""


    # load plugins
    plugins = []
    for plugin_name, active in get('settings').get('rw.plugins', {}).items():
        plugin = __import__(plugin_name)
        plugin_path = plugin_name.split('.')[1:] + ['plugin']
        for sub in plugin_path:
            plugin = getattr(plugin, sub)
        plugins.append(scope.activate(plugin))

    yield plugins
    raise rw.gen.Return(scope['settings'])