def _get_plugin(plugin_name, plugin_list):
 plugin = None
 for plug in plugin_list:
  if (plug[u'name'] == plugin_name):
   plugin = plug
   break
 return plugin

def _get_plugin ( plugin_name , plugin_list ) : plugin = None for plug in plugin_list : if ( plug [ u'name' ] == plugin_name ) : plugin = plug break return plugin
takes a plugin name and plugin list and return the plugin object .