':return: An instance of a plugin.'

def get_plugin_inst(self, plugin_type, plugin_name):

    plugin_inst = factory(('w3af.plugins.%s.%s' % (plugin_type, plugin_name)))
    plugin_inst.set_url_opener(self._w3af_core.uri_opener)
    plugin_inst.set_worker_pool(self._w3af_core.worker_pool)
    if (plugin_name in self._plugins_options[plugin_type].keys()):
        custom_options = self._plugins_options[plugin_type][plugin_name]
        plugin_inst.set_options(custom_options)
    if ((plugin_type == 'attack') and (not self.initialized)):
        self.init_plugins()
    return plugin_inst
