<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_gradients_diag(self, dL_dKdiag, X):
 """derivative of the diagonal of the covariance matrix with respect to the parameters."""

        self.variance.gradient = np.sum(dL_dKdiag)
        self.period.gradient = 0
        self.lengthscale.gradient = 0