Constrained coefficients problem for generalized typically real functions