def handle_elt(self, elt, context):
        word = ''
        flag = False
        is_not_interp = True
        #if tags not specified, then always return word
        if self.tags is None:
            flag = True

        for child in elt:

            #get word
            if 'name' in child.keys() and child.attrib['name'] == 'orth':
                for symbol in child:
                    if symbol.tag == 'string':
                        word = symbol.text
            elif 'name' in child.keys() and child.attrib['name'] == 'interps':
                for symbol in child:
                    if 'type' in symbol.keys() and symbol.attrib['type'] == 'lex':
                        for symbol2 in symbol:
                            if symbol2.keys() in 'name' and symbol2.attrib['name'] == 'ctag':
                                for symbol3 in symbol2:
                                    if 'value' in symbol3.keys() and self.tags is not None and symbol3.attrib['value'] in self.tags:
                                        flag = True
                                    elif 'value' in symbol3.keys() and symbol3.attrib['value'] == 'interp':
                                        is_not_interp = False
        if flag and is_not_interp:
            return word
dataset/ETHPy150Open nltk/nltk/nltk/corpus/reader/nkjp.py/NKJPCorpus_Morph_View.handle_elt/swapped operands of `in`