def METHOD_NAME(self, cells):
    for id in cells:
        if id.local and not id.celltype.injectable:
            raise TypeError("Can't inject current into a spike source.")
    if isinstance(cells, (Population, PopulationView, Assembly)):
        self.cell_list = cells.node_collection
    else:
        self.cell_list = nest.NodeCollection(sorted(cells))
    nest.Connect(self._device, self.cell_list, syn_spec={"delay": state.min_delay})