code: def test_embeddable(self):
      import ctypes
  
      from setuptools.command.build_ext import new_compiler
  
      with open("embed_pil.c", "w", encoding="utf-8") as fh:
          fh.write(
              """
  #include "Python.h"
  
  int main(int argc, char* argv[])
  {
      char *home = "%s";
      wchar_t *whome = Py_DecodeLocale(home, NULL);
      Py_SetPythonHome(whome);
  
      Py_InitializeEx(0);
      Py_DECREF(PyImport_ImportModule("PIL.Image"));
      Py_Finalize();
  
      Py_InitializeEx(0);
      Py_DECREF(PyImport_ImportModule("PIL.Image"));
      Py_Finalize();
  
      PyMem_RawFree(whome);
  
      return 0;
  }
          """
              % sys.prefix.replace("\\", "\\\\")
          )
  
      compiler = new_compiler()
      compiler.add_include_dir(sysconfig.get_config_var("INCLUDEPY"))
  
      libdir = sysconfig.get_config_var(
          "LIBDIR"
      ) or sysconfig.get_config_var("INCLUDEPY").replace(
          "include", "libs"
      )
      compiler.add_library_dir(libdir)
      objects = compiler.compile(["embed_pil.c"])
      compiler.link_executable(objects, "embed_pil")
  
      env = os.environ.copy()
      env["PATH"] = sys.prefix + ";" + env["PATH"]
  
      # do not display the Windows Error Reporting dialog
      ctypes.windll.kernel32.SetErrorMode(0x0002)
  
      process = subprocess.Popen(["embed_pil.exe"], env=env)
      process.communicate()
      assert process.returncode == 0
  
imports: from __future__ import annotations
  import os
  import subprocess
  import sys
  import sysconfig
  import pytest
  from PIL import Image
  from .helper import assert_image_equal, hopper, is_win32
label_desc: Use image node_id 1 for calling the TestEmbeddable obj's underlying member method code with example usage: obj.test_embeddable() without return types