def METHOD_NAME(self, simulation):
    simdata = self.simdata[simulation]
    offset = 0
    for cell_model in sorted(simulation.cell_models.values()):
        ps = cell_model.cell_type.get_placement_set()
        simdata.cid_offsets[cell_model.cell_type] = offset
        with ps.chunk_context(simdata.chunks):
            self._create_population(simdata, cell_model, ps, offset)
        offset += len(ps)