def expected(decorator, func):
 return (decorator(func) if (not hasattr(func, '_api')) else func)

def expected ( decorator , func ) : return ( decorator ( func ) if ( not hasattr ( func , '_api' ) ) else func )
decorate func with decorator if func is not wrapped yet .