#NEWLINE# def almost_equal( a , b ) : #NEWLINE# #INDENT# if ( ( isinstance ( a , list ) and isinstance ( b , list ) ) or ( isinstance ( a , tuple ) and isinstance ( b , tuple ) ) ) : #NEWLINE# #INDENT# return ( ( len ( a ) == len ( b ) ) and all ( ( almost_equal ( aa , bb ) for ( aa , bb ) in zip ( a , b ) ) ) ) #NEWLINE# #UNINDENT# if ( isinstance ( a , float ) or isinstance ( b , float ) ) : #NEWLINE# #INDENT# return ( round ( abs ( ( a - b ) ) , 6 ) == 0 ) #NEWLINE# #UNINDENT# return ( a == b )