def apply_optimizer(optimizer, func, a, b):
 return (optimizer(func, a, b, full_output=True)[1].function_calls,)

def apply_optimizer ( optimizer , func , a , b ) : return ( optimizer ( func , a , b , full_output = True ) [ 1 ] . function_calls , )
return the number of function calls given an root-finding optimizer .