def n_indexes(self, randomize=False):
        if randomize:
            # get a random ordering of all n_indexes
            n_indexes = random.sample(self._ordered_n_indexes,
                                      len(self._ordered_n_indexes))
        else:
            # use the indexes in sorted order
            n_indexes = self._ordered_n_indexes
        for n_index in n_indexes:
            yield n_index
Generate all neighbor indexes.
dataset/ETHPy150Open kobejohn/polymaze/polymaze/shapes.py/_ComponentShape.n_indexes