def rosenbrock_gen(xy, A=<NUM_LIT:10>, order=<NUM_LIT:3>):
x, y = xy<EOL>r1 = x<EOL>r2 = A*(y-x**order / order)<EOL>return np.array([r1, r2])<EOL>
A generalized rosenbrock banana function, as a set of residuals
(cost = sum(residuals**2))

The Rosenbrock function, generalized from a quadratic model to a
higher-order nonlinearity. The residuals are
    r1 = xy[0]
    r2 = xy[1] - xy[0]^n/n
The original function is with data = [1,0] and order=2, and has a
single minimum at (x,y) = (1, 1/order). The model is coupled,
polynomial in x and linear in y. Its data-space dimension (2) is
equal to its model-space dimension (2), so there is only parameter-
effect curvature. (See M Transtrum et al, PRE 2011)

Parameters
----------
    - xy : 2-element list-like
        The x,y parameters of the model.
    - order : Int, optional
        The order of the model nonlinearity. Default is 3

Returns
-------
    2-element list-like
        The residuals of the model.