def find_first(self, term, value=False):
if '<STR_LIT:.>' in term:<EOL><INDENT>parent, term = term.split('<STR_LIT:.>')<EOL>assert parent.lower() == self.record_term_lc, (term, parent.lower(), self.record_term_lc)<EOL><DEDENT>for c in self.children:<EOL><INDENT>if c.record_term_lc == term.lower():<EOL><INDENT>if value is False or c.value == value:<EOL><INDENT>return c<EOL><DEDENT><DEDENT><DEDENT>return None<EOL>
Like find(), but returns only the first matching term