def getChapterByIndex(self, index, article):
        u"""Find the chapter by **index** in the Article instance **article**.
        Answer **None** if the chapter index is not valid."""
        if 0 <= index < len(article.chapters):
            return article.chapters[index]
        return None
dataset/ETHPy150Open petrvanblokland/Xierpa3/xierpa3/adapters/textilefileadapter.py/TextileFileAdapter.getChapterByIndex/original