solve for any one parameter of the power of a two sample ztest
exactly one needs to be None, all others need numeric values
Parameters:  effect_size : float
nobs1 : int or float
alpha : float in interval (0,1)
power : float in interval (0,1)
ratio : float
alternative : string, ‘twosided’ (default), ‘larger’, ‘smaller’


Returns:  value : float

Notes
The function uses scipy.optimize for finding the value that satisfies the power equation. It first uses brentq with a prior search for bounds. If this fails to find a root, fsolve is used. If fsolve also fails, then, for alpha, power and effect_size, brentq with fixed bounds is used. However, there can still be cases where this fails.