def METHOD_NAME(lines):
    if len(lines) > 0 and lines[-1]:
        # note we update the last line rather than adding a new one
        # so that the diff will show the warning with the last line
        lines[-1] += '\n\\ No newline at end of file\n'