def getRhymingWord(self, curLine, person):
        """What word should go on the end of this line so it rhymes with the
        previous?"""
        
        try:
            rhymeLine = self.getRhymeLine(curLine)
        except __HOLE__:
            return None

        rhymeWord = self.poem[rhymeLine].split()[-1]
        
        rhymes = self.getRhymes(rhymeWord)
        if rhymes == None:
            return None
        
        # now we look for rhyming words in our chain
        for rhyme in rhymes:
            word = self.brains[person]["rev"].chain.get(str(rhyme.lower()))
            if (word is not None and
                rhyme.lower() != self.cleanWord(rhymeWord.lower())):
                return rhyme.lower()

        # the loop exited without breaking, so we found no rhymes that exist in
        # our Markov chains
        return None
dataset/ETHPy150Open capnrefsmmat/seuss/rhyme.py/RhymingMarkovGenerator.getRhymingWord