def identify_format(origin, data_class_required, path, fileobj, args, kwargs):
 valid_formats = []
 for (data_format, data_class) in _identifiers:
  if _is_best_match(data_class_required, data_class, _identifiers):
   if _identifiers[(data_format, data_class)](origin, path, fileobj, *args, **kwargs):
    valid_formats.append(data_format)
 return valid_formats

def identify_format ( origin , data_class_required , path , fileobj , args , kwargs ) : valid_formats = [ ] for ( data_format , data_class ) in _identifiers : if _is_best_match ( data_class_required , data_class , _identifiers ) : if _identifiers [ ( data_format , data_class ) ] ( origin , path , fileobj , * args , ** kwargs ) : valid_formats . append ( data_format ) return valid_formats
loop through identifiers to see which formats match .