def has_pairs(profile):
 return ((len(profile) > 0) and isinstance(profile[0], list))

def has_pairs ( profile ) : return ( ( len ( profile ) > 0 ) and isinstance ( profile [ 0 ] , list ) )
returns true if the python that produced the argument profile was built with -ddxpairs .