#NEWLINE# def is_nested_tuple( tup , labels ) : #NEWLINE# #INDENT# if ( not isinstance ( tup , tuple ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# for ( i , k ) in enumerate ( tup ) : #NEWLINE# #INDENT# if isinstance ( i , ( tuple , list , slice ) ) : #NEWLINE# #INDENT# return isinstance ( labels , MultiIndex ) #NEWLINE# #UNINDENT# #UNINDENT# return False