code: def test_import_at_shutdown():
      # GH-38626: importing PyArrow at interpreter shutdown would crash
      code = """if 1:
          import atexit
  
          def import_arrow():
              import pyarrow
  
          atexit.register(import_arrow)
          """
      subprocess.check_call([sys.executable, "-c", code])
  
file_path: arrow/python/pyarrow/tests/test_misc.py
imports: import os
  import subprocess
  import sys
  import pytest
  import pyarrow
  from pyarrow.lib import ArrowInvalid
label_desc: Use image node_id 8 for calling a global function with example usage: test_import_at_shutdown() without return types