<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gradient(self, mu, dist):
 """ derivative of the link function wrt mu Parameters mu : array-like of legth n dist : Distribution instance Returns ------- grad : np.array of length n """

        return dist.levels/(mu*(dist.levels - mu))