Residue.get_trailing_gaps() — get number of gaps after this residue

get_trailing_gaps()
This returns the number of gaps in the alignment immediately following this residue. Not available for model sequences.