solve for any one parameter of the power of a one sample ttest
Exactly one needs to be None, all others need numeric values.
This test can also be used for a paired ttest, where effect size is defined in terms of the mean difference, and nobs is the number of pairs.
Parameters:  effect_size : float
nobs : int or float
alpha : float in interval (0,1)
power : float in interval (0,1)
alternative : string, ‘twosided’ (default) or ‘onesided’


Returns:  value : float
*attaches* : cache_fit_res : list

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.