docs: def _extend_spikes(spike_ids, spike_clusters):
      """Return all spikes belonging to the clusters containing the specified
      spikes."""
      # We find the spikes belonging to modified clusters.
      # What are the old clusters that are modified by the assignment?
      old_spike_clusters = spike_clusters[spike_ids]
      unique_clusters = _unique(old_spike_clusters)
      # Now we take all spikes from these clusters.
      changed_spike_ids = _spikes_in_clusters(spike_clusters, unique_clusters)
      # These are the new spikes that need to be reassigned.
      extended_spike_ids = np.setdiff1d(changed_spike_ids, spike_ids,
                                        assume_unique=True)
      return extended_spike_ids