code: def d3logpdf_dlink3(self, link_f, y, Y_metadata=None):
          
          # c = Y_metadata['censored']
          #  for debugging
          # c = np.zeros((y.shape[0],))
          c = np.zeros_like(link_f)
  
          if Y_metadata is not None and 'censored' in Y_metadata.keys():
              c = Y_metadata['censored']
          y_link_f = y/link_f
          y_link_f_r = y_link_f**self.r
  
          #In terms of link_f
          censored = c*(self.r*y_link_f_r*(((self.r**2)*(-(y_link_f_r - 1))) + 3*self.r*(y_link_f_r + 1) + 2*(y_link_f_r + 1)**2)
                        / ((link_f**3)*(y_link_f_r + 1)**3))
          uncensored = (1-c)*(2*self.r*(-(self.r**2)*(y_link_f_r -1)*y_link_f_r + 3*self.r*(y_link_f_r + 1)*y_link_f_r + (y_link_f_r - 1)*(y_link_f_r + 1)**2)
                              / ((link_f**3)*(y_link_f_r + 1)**3))
  
          d3lik_dlink3 = censored + uncensored
          return d3lik_dlink3
docs: Third order derivative log-likelihood function at y given link(f) w.r.t link(f)
  
          .. math::
  
  
          :param link_f: latent variables link(f)
          :type link_f: Nx1 array
          :param y: data
          :type y: Nx1 array
          :param Y_metadata: includes censoring information in dictionary key 'censored'
          :returns: third derivative of likelihood evaluated at points f
          :rtype: Nx1 array