code: def negative_gradient(self, y, y_pred, sample_weight=None, **kwargs):
          
          ret = coxph_negative_gradient(y['event'].astype(numpy.uint8), y['time'], y_pred.ravel())
          if sample_weight is not None:
              ret *= sample_weight
          return ret
docs: Negative gradient of partial likelihood
  
          Parameters
          ---------
          y : tuple, len = 2
              First element is boolean event indicator and second element survival/censoring time.
          y_pred : np.ndarray, shape=(n,):
              The predictions.