code: def _param_grad_helper(self, dL_dK, X, X2, target):
          
          if (X2 is None) or (X2 is X):
              dL_dKdiag = dL_dK.flat[::dL_dK.shape[0]+1]
              self.dKdiag_dtheta(dL_dKdiag, X, target)
docs: Derivative of the covariance with respect to the parameters.