def _is_end_of_rti(line):
    """Check if line in an rti is at the end of the section."""
    return (
        line
        and "@" not in line
        and not line == "\n"
        and not line.strip().startswith("#")
    )