code: def test_hazard_rate_from_survival_function(self):
      n_observations = 100
      timestamps = np.random.uniform(size=n_observations)
      observations = np.ones(n_observations)
      hzrd = nelson_aalen(timestamps, observations)
      surv = kaplan_meier(timestamps, observations)
      surv_from_hzrd = np.exp(-hzrd)
      self.assertTrue(np.allclose(surv, surv_from_hzrd, atol=1e-2))
  
imports: import unittest
  import numpy
  from tick.survival import nelson_aalen, kaplan_meier
label_desc: Use image node_id 1 for calling the Test obj's underlying member method code with example usage: obj.test_hazard_rate_from_survival_function() without return types