def forceDecodePrune(self, refsLst, last_cell=False):

        left_side = 'S'             # forceDecodePrune() can only be used in 'S' cells for 'S' derivations
        for key in self.table.iterkeys():
            if key[0] != left_side: continue
            cand_indx = 0
            for cand in self.table[key][:]:
                matches_ref = False
                cand_tgt = Hypothesis.getHypothesis(cand)
                for ref_i in refsLst:
                    if (not last_cell and ref_i.startswith(cand_tgt)) or (last_cell and ref_i == cand_tgt):
                        matches_ref = True
                        break
                if not matches_ref: del self.table[key][cand_indx]
                else: cand_indx += 1

            # If all the entries are deleted, then there will be no S derivations in the cell; set has_S_tree as False
            if not self.table[key]: self.has_S_tree = False
        return self.has_S_tree
Add a chart to the sheet
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Decoder/cell.py/Cell.forceDecodePrune--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/worksheet/worksheet.py/Worksheet.add_chart