def get_real_end_line(token):
end_line = token.end_mark.line + <NUM_LIT:1><EOL>if not isinstance(token, yaml.ScalarToken):<EOL><INDENT>return end_line<EOL><DEDENT>pos = token.end_mark.pointer - <NUM_LIT:1><EOL>while (pos >= token.start_mark.pointer - <NUM_LIT:1> and<EOL>token.end_mark.buffer[pos] in string.whitespace):<EOL><INDENT>if token.end_mark.buffer[pos] == '<STR_LIT:\n>':<EOL><INDENT>end_line -= <NUM_LIT:1><EOL><DEDENT>pos -= <NUM_LIT:1><EOL><DEDENT>return end_line<EOL>
Finds the line on which the token really ends.

    With pyyaml, scalar tokens often end on a next line.