def keras_test(func):
 @six.wraps(func)
 def wrapper(*args, **kwargs):
  output = func(*args, **kwargs)
  if (K.backend() == 'tensorflow'):
   K.clear_session()
  return output
 return wrapper

def keras_test ( func ) : @ six . wraps ( func ) def wrapper ( * args , ** kwargs ) : output = func ( * args , ** kwargs ) if ( K . backend ( ) == 'tensorflow' ) : K . clear_session ( ) return output return wrapper
function wrapper to clean up after tensorflow tests .