def _load_plugins(namespace, instantiate=True):
mgr = ExtensionManager(<EOL>namespace=namespace,<EOL>on_load_failure_callback=(<EOL>lambda _, ep, err: LOGGER.<EOL>warning('<STR_LIT>'.format(ep.name, err))<EOL>)<EOL>)<EOL>if instantiate:<EOL><INDENT>plugins = dict(<EOL>(<EOL>ext.name,<EOL>ext.plugin if isinstance(ext.plugin, Plugin) else ext.plugin()<EOL>) for ext in mgr<EOL>)<EOL><DEDENT>else:<EOL><INDENT>plugins = dict((ext.name, ext.plugin) for ext in mgr)<EOL><DEDENT>return plugins<EOL>
Loads all the plugins for the given namespace

Args:
    namespace(str): Namespace string, as in the setuptools entry_points
    instantiate(bool): If true, will instantiate the plugins too

Returns:
    dict of str, object: Returns the list of loaded plugins