def GetSmallestThumbnail(media_thumbnail_list):
 r = {}
 for thumb in media_thumbnail_list:
  r[(int(thumb.width) * int(thumb.height))] = thumb
 keys = r.keys()
 keys.sort()
 return r[keys[0]]

def GetSmallestThumbnail ( media_thumbnail_list ) : r = { } for thumb in media_thumbnail_list : r [ ( int ( thumb . width ) * int ( thumb . height ) ) ] = thumb keys = r . keys ( ) keys . sort ( ) return r [ keys [ 0 ] ]
helper function to get the smallest thumbnail of a list of gdata .