<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gev_expval(xi, mu=0, sigma=1):
 """ Expected value of generalized extreme value distribution. """

    return mu - (sigma / xi) + (sigma / xi) * flib.gamfun(1 - xi)