def metadata_summary(plugins, version=None):
 no_metadata = {}
 has_metadata = {}
 supported_by = defaultdict(set)
 status = defaultdict(set)
 plugins = list(plugins)
 all_mods_metadata = return_metadata(plugins)
 for (name, filename) in plugins:
  if ((name not in no_metadata) and (name not in has_metadata)):
   metadata = all_mods_metadata[name]
   if (metadata is None):
    no_metadata[name] = filename
   elif ((version is not None) and (('version' not in metadata) or (StrictVersion(metadata['version']) < StrictVersion(version)))):
    no_metadata[name] = filename
   else:
    has_metadata[name] = filename
  if (all_mods_metadata[name] is None):
   supported_by[DEFAULT_METADATA['supported_by']].add(filename)
   status[DEFAULT_METADATA['status'][0]].add(filename)
  else:
   supported_by[all_mods_metadata[name]['supported_by']].add(filename)
   for one_status in all_mods_metadata[name]['status']:
    status[one_status].add(filename)
 return (list(no_metadata.values()), list(has_metadata.values()), supported_by, status)

def metadata_summary ( plugins , version = None ) : no_metadata = { } has_metadata = { } supported_by = defaultdict ( set ) status = defaultdict ( set ) plugins = list ( plugins ) all_mods_metadata = return_metadata ( plugins ) for ( name , filename ) in plugins : if ( ( name not in no_metadata ) and ( name not in has_metadata ) ) : metadata = all_mods_metadata [ name ] if ( metadata is None ) : no_metadata [ name ] = filename elif ( ( version is not None ) and ( ( 'version' not in metadata ) or ( StrictVersion ( metadata [ 'version' ] ) < StrictVersion ( version ) ) ) ) : no_metadata [ name ] = filename else : has_metadata [ name ] = filename if ( all_mods_metadata [ name ] is None ) : supported_by [ DEFAULT_METADATA [ 'supported_by' ] ] . add ( filename ) status [ DEFAULT_METADATA [ 'status' ] [ 0 ] ] . add ( filename ) else : supported_by [ all_mods_metadata [ name ] [ 'supported_by' ] ] . add ( filename ) for one_status in all_mods_metadata [ name ] [ 'status' ] : status [ one_status ] . add ( filename ) return ( list ( no_metadata . values ( ) ) , list ( has_metadata . values ( ) ) , supported_by , status )
compile information about the metadata status for a list of modules :arg plugins: list of plugins to look for .