def ConvertValuesWithMetadata(metadata_value_pairs, token=None, options=None):
 no_converter_found_error = None
 for (rdf_type, metadata_values_group) in utils.GroupBy(metadata_value_pairs, (lambda pair: pair[1].__class__.__name__)).iteritems():
  _ = rdf_type
  (_, first_value) = metadata_values_group[0]
  converters_classes = ExportConverter.GetConvertersByValue(first_value)
  if (not converters_classes):
   no_converter_found_error = ('No converters found for value: %s' % str(first_value))
   continue
  converters = [cls(options) for cls in converters_classes]
  for converter in converters:
   for result in converter.BatchConvert(metadata_values_group, token=token):
    (yield result)
 if (no_converter_found_error is not None):
  raise NoConverterFound(no_converter_found_error)

def ConvertValuesWithMetadata ( metadata_value_pairs , token = None , options = None ) : no_converter_found_error = None for ( rdf_type , metadata_values_group ) in utils . GroupBy ( metadata_value_pairs , ( lambda pair : pair [ 1 ] . __class__ . __name__ ) ) . iteritems ( ) : _ = rdf_type ( _ , first_value ) = metadata_values_group [ 0 ] converters_classes = ExportConverter . GetConvertersByValue ( first_value ) if ( not converters_classes ) : no_converter_found_error = ( 'No converters found for value: %s' % str ( first_value ) ) continue converters = [ cls ( options ) for cls in converters_classes ] for converter in converters : for result in converter . BatchConvert ( metadata_values_group , token = token ) : ( yield result ) if ( no_converter_found_error is not None ) : raise NoConverterFound ( no_converter_found_error )
converts a set of rdfvalues into a set of export-friendly rdfvalues .