code: def check_library(
      compiler,
      includes=(),
      libraries=(),
      include_dirs=(),
      library_dirs=(),
      define_macros=None,
      extra_compile_args=(),
  ):
      source = "".join(
          ["#include <%s>\n" % header for header in includes]
      )
      source += "int main() {return 0;}"
      try:
          # We need to try to build a shared library because distutils
          # uses different option to build an executable and a shared library.
          # Especially when a user build an executable, distutils does not use
          # LDFLAGS environment variable.
          build.build_shlib(
              compiler,
              source,
              libraries,
              include_dirs,
              library_dirs,
              define_macros,
              extra_compile_args,
          )
      except Exception as e:
          print(e)
          sys.stdout.flush()
          return False
      return True
  
imports: import copy
  from distutils import ccompiler
  from distutils import sysconfig
  import os
  import shutil
  import sys
  import setuptools
  import cupy_builder.install_build
  from cupy_builder._context import Context
  from cupy_builder.install_build import PLATFORM_LINUX
  from cupy_builder.install_build import PLATFORM_WIN32
label_desc: Use image node_id 5 for calling a global function with example usage: check_library(compiler, includes, libraries, include_dirs, library_dirs, define_macros, extra_compile_args) and returns: True, False