def _loadPlugins(analyzer, plugin, pluginClass):
  assert type(plugin) == type(sys)
  
  # Check that we fullfil the plugin's project requirements
  try:
    if not analyzer.project.config.name.lower().startswith(plugin.requiredLibrary):
      return []
  except AttributeError:
    pass
  
  try:
    plugins = plugin.plugins
  except __HOLE__:
    return []
  return [cls(analyzer) for cls in plugins if issubclass(cls, pluginClass)]
dataset/ETHPy150Open skyostil/tracy/src/analyzer/Plugin.py/_loadPlugins