code: def define_extensions(**kwargs):
      system = platform.system().lower()
      if "windows" in system:  # Windows
          sys.exit("Installation on Windows is not supported yet.")
      elif "darwin" in system:  # osx
          is_buildable()[0] or set_binary_mac()
  
      able, fail_msg = is_buildable()
      if not able:
          sys.exit(fail_msg)
  
      libraries = []
      extra_link_args = []
      extra_compile_args = [
          "-std=c++14",
          "-O3",
          "-fPIC",
          "-march=native",
          "-DNDEBUG",
          "-DBOOST_DISABLE_ASSERTS",
      ]
      extra_link_args.append("-fopenmp")
      extra_compile_args.append("-fopenmp")
  
      sources = [
          "./src/heuristic.cc",
          "./src/hnsw.cc",
          "./src/hnsw_node.cc",
          "./src/hnsw_build.cc",
          "./src/hnsw_model.cc",
          "./src/hnsw_search.cc",
          "./src/mmap.cc",
          "./bindings/python/n2.pyx",
      ]
  
      boost_dirs = [
          "assert",
          "bind",
          "concept_check",
          "config",
          "core",
          "detail",
          "heap",
          "iterator",
          "mp11",
          "mpl",
          "parameter",
          "preprocessor",
          "static_assert",
          "throw_exception",
          "type_traits",
          "utility",
      ]
      include_dirs = [
          "./include/",
          "./third_party/spdlog/include/",
          "./third_party/eigen",
      ]
      include_dirs.extend(
          ["third_party/boost/" + b + "/include/" for b in boost_dirs]
      )
  
      return Extension(
          name="n2",
          sources=sources,
          extra_compile_args=extra_compile_args,
          libraries=libraries,
          extra_link_args=extra_link_args,
          include_dirs=include_dirs,
          language="c++",
      )
  
file_path: n2/setup.py
imports: import io
  import os
  import sys
  import glob
  import platform
  import subprocess
  from setuptools import Extension, setup
label_desc: Use image node_id 4 for calling a global function with example usage: define_extensions() and returns: Extension