code: def _mypy_check_file(fn, raises):
      result = mypy.api.run(
          [os.path.join(TEST_DIR, "testdata", "typing", fn)]
      )
      if raises:
          assert result[2] != 0, result
      else:
          assert result[2] == 0, result
  
imports: import os
  import mypy.api
  import pytest
  from tests import TEST_DIR
label_desc: Use image node_id 1 for calling a global function with example usage: _mypy_check_file(fn, raises) without return types