code: def test_no_newline_before_EOF(filename: str) -> None:
      source = Path(filename).read_text()
      if source and source[-1] != "\n":
          raise CodeConventionError(
              f"Please add a new line at the end of regular files. File: {filename}"
          )
  
imports: import dataclasses
  import re
  import subprocess
  from ast import Attribute, Call, Constant, Name, NodeVisitor, parse
  from pathlib import Path
  from typing import Any, Callable, Dict, List
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_no_newline_before_EOF(filename) without return types