What does the following code do?

def create_function(n0, hl):
  return lambda t: n0*np.power(1/2, t/hl)

class HalfLife:

  def __init__(self, hl, max):
    self.hl = hl
    self.max = max
    self.data = np.zeros(max)
    self.x = np.arange(0, self.max, 1)


  def add(self, time, n0):
    f = create_function(n0, self.hl)
    base = np.vectorize(f)(self.x)

    self.data = self.data + np.concatenate((np.zeros(time), base))[:self.max]



  def show(self):
    fig = px.line(x=self.x, y=self.data, labels={'x': "Hour", 'y': "mg"})
  
    fig.update_layout(
        hovermode="x unified",
        template = 'plotly_dark',
        xaxis = dict(
          title_text="Hours",
          dtick = 24,
          showspikes=True
        ),
        yaxis = dict(
          title_text="mg",
          showspikes=True
        ))


    fig.show()