def getkItems4Diversity(self, cube_indx, k):

        neighbours = []
        while True:
            new_items_so_far = len(neighbours)
            for r in self.trackCubeDict.keys():
                if self.trackCubeDict[r] == 0: continue         # ignore the closed frontiers

                for div_candTup in self.xploreNeighbours(cube_indx, list(r)):
                    if div_candTup[1] is not None:
                        neighbours.append(div_candTup)

                # We have found 'k' new items for diversity; break and return them
                if len(neighbours) >= k: break

            # If all the entries in the Cube have been explored already Or if it didn't add any new items:
            #   break and return empty list
            if not neighbours or len(neighbours) == new_items_so_far: break

        return neighbours
Get k additional items for increasing the diversity in the Cube
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Decoder/lazyMerge_CP.py/Cube.getkItems4Diversity