code: def has_flag(compiler, flagname):
      """Return a boolean indicating whether a flag name is supported on
      the specified compiler.
      """
      import tempfile
  
      with tempfile.NamedTemporaryFile("w", suffix=".cpp") as f:
          f.write("int main (int argc, char **argv) { return 0; }")
          try:
              compiler.compile([f.name], extra_postargs=[flagname])
          except setuptools.distutils.errors.CompileError:
              return False
      return True
  
file_path: hnswlib/setup.py
imports: import os
  import sys
  import platform
  import numpy
  import pybind11
  import setuptools
  from setuptools import Extension, setup
  from setuptools.command.build_ext import build_ext
label_desc: Use image node_id 1 for calling a global function with example usage: has_flag(compiler, flagname) and returns: True, False