#NEWLINE# def _case_exists( self ) : #NEWLINE# #INDENT# ( t1 , t2 ) = ( self . t1 , self . t2 ) #NEWLINE# cond = ( t1 . key1 == t2 . key1 ) . any ( ) #NEWLINE# expr = t1 [ cond ] #NEWLINE# cond2 = ( ( t1 . key1 == t2 . key1 ) & ( t2 . key2 == 'foo' ) ) . any ( ) #NEWLINE# expr2 = t1 [ cond2 ] #NEWLINE# return ( t2 , expr2 )