def append_superpositions(superpositions, idx1, idx2):
    """
    Add indices *idx1* and *idx2* (associted to the new superposed sink) in the
    appropriate set of indices ; in-place.

    Parameters
    ----------
    superpositions: list
        List of sets. Each set arguments are the indices of the sinks located
        at a same location.
    idx1: int
        Index of the first superposed sink.
    idx2: int
        Index of the second superposed sink.
    """
    if len(superpositions) == 0:
        superpositions.append(set([idx1, idx2]))
    else:
        new_superposition = True
        for superposition in superpositions:
            if idx1 in superposition or idx2 in superposition:
                superposition.add(idx1)
                superposition.add(idx2)
                new_superposition = False
                break
        if new_superposition is True:
            superpositions.append(set([idx1, idx2]))
