EDIT: Sorry I didn't notice the library used here is textgrid, not textgrids. Nvm.
See build_dataset.py. Rather than tg[1], obviously tg["phones"] is more robust, since it's the phones tier that is desired in this case. In case the TextGrid file includes sentence tier by mistake, the latter would still work.