#NEWLINE# def _ContactPropertiesToXml( self ) : #NEWLINE# #INDENT# " Convert this kind's Contact properties kind to XML. For testability,\n    the XML elements in the output are sorted alphabetically by property name.\n\n    Returns:\n    string  # the XML representation of the Contact properties\n    " #NEWLINE# properties = self . _contact_properties . intersection ( set ( self . keys ( ) ) ) #NEWLINE# xml = '' #NEWLINE# for prop in sorted ( properties ) : #NEWLINE# #INDENT# values = self [ prop ] #NEWLINE# if ( not isinstance ( values , list ) ) : #NEWLINE# #INDENT# values = [ values ] #NEWLINE# #UNINDENT# for value in values : #NEWLINE# #INDENT# assert isinstance ( value , datastore_types . Key ) #NEWLINE# xml += ( '\n  <gd:who rel="http://schemas.google.com/g/2005#%s.%s>\n    <gd:entryLink href="%s" />\n  </gd:who>' % ( self . kind ( ) . lower ( ) , prop , value . ToTagUri ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return xml