def get_plugin_instance(namespace, name, invoke_on_load=True):
    """Return class instance for the provided plugin name and namespace."""
    from stevedore.driver import DriverManager

    manager = DriverManager(
        namespace=namespace, name=name, invoke_on_load=invoke_on_load
    )
    return manager.driver
Return class instance for the provided plugin name and namespace.
st2common/st2common/util/loader.py