def METHOD_NAME(self, ensemble):
    """Writes ensemble attributes necessary to restart from checkpoint.
    Parameters
    ----------
    ensemble : ptemcee.Ensemble
        The ensemble to write attributes for.
    """
    group = self[self.sampler_group]
    for attr in self._ensemble_attrs:
        vals = getattr(ensemble, attr)
        try:
            group[attr][:] = vals
        except KeyError:
            group[attr] = vals