def getXLevelStats(self, sh_order):

        left_side = "X"
        for key in self.table.iterkeys():
            if key[0] != left_side: continue

            found_levels = 0
            curr_depth = self.top_X_level + 1 if self.top_X_level < sh_order else sh_order
            XLevels = [False for i in xrange(curr_depth)]
            for entry in self.table[key]:
                entry_depth = entry.depth_hier
                if entry_depth < curr_depth:
                    try:
                        if not XLevels[entry_depth]:
                            XLevels[entry_depth] = True
                            found_levels += 1
                    except IndexError:
                        sys.stderr.write("ERROR: Index Out of Range error in cell.py : 291\n")
                        sys.stderr.write("       Index %d exceeds the size of array XLevels (%d). Exiting!!\n" % (entry_depth, curr_depth))
                        sys.exit(1)
                if (found_levels == curr_depth): break

            return XLevels
Checks and return the stats about the levels for different X-rules in the current span.
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Decoder/cell.py/Cell.getXLevelStats