def METHOD_NAME(self, lut):
    for index in range(self.count()):
        if self.itemData(index, role=self.LUT_NAME) is not None:
            continue
        colors = self.itemData(index, role=self.LUT_COLORS)
        if colors is None:
            continue
        if numpy.array_equal(colors, lut):
            return index
    return -1