def count_trailing_newlines(s):
    return s[len(s.rstrip()):].count('\n')
count number of trailing newlines
dataset/ETHPy150Open KristoforMaynard/SublimeAutoDocstring/docstring_styles.py/count_trailing_newlines