def METHOD_NAME(self):
    """Writes a copy of relevant metadata to the file's checkpoint history.
    All data are written to ``sampler_info/checkpoint_history``. If the
    group does not exist yet, it will be created.
    This function writes the current time and the time since the last
    checkpoint to the file. It will also call
    :py:func:`_update_sampler_history` to write sampler-specific history.
    """
    path = '/'.join([self.sampler_group, 'checkpoint_history'])
    try:
        history = self[path]
    except KeyError:
        # assume history doesn't exist yet
        self.create_group(path)
        history = self[path]
    # write the checkpoint time
    current_time = time.time()
    self.write_data('checkpoint_time', current_time, path=path,
                    append=True)
    # get the amount of time since the last checkpoint
    checkpoint_times = history['checkpoint_time'][()]
    if len(checkpoint_times) == 1:
        # this is the first checkpoint, get the run time for comparison
        lasttime = self.run_start_time
    else:
        lasttime = checkpoint_times[-2]
        # if a resume happened since the last checkpoint, use the resume
        # time instad
        if lasttime < self.run_start_time:
            lasttime = self.run_start_time
    self.write_data('checkpoint_dt', current_time-lasttime, path=path,
                    append=True)
    # write any sampler-specific history
    self._update_sampler_history()