<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def weights(self, mu):
 r""" Weights for IRLS steps Parameters mu : array-like The transformed mean response variable in the exponential family Returns ------- w : array The weights for the IRLS steps """

        return 1. / (self.link.deriv(mu)**2 * self.variance(mu))