code: def determine_deaths(self, event: Event):
          
          effective_rate = self.mortality_rate(event.index)
          effective_probability = 1 - np.exp(-effective_rate)
          draw = self.randomness.get_draw(event.index)
          affected_simulants = draw < effective_probability
          self.population_view.update(pd.Series('dead', index=event.index[affected_simulants]))
docs: Determines who dies each time step.
  
          Parameters
          ----------
          event :
              An event object emitted by the simulation containing an index
              representing the simulants affected by the event and timing
              information.