code: def cpp_flag(compiler):
      """Return the -std=c++[11/14] compiler flag.
      The c++14 is prefered over c++11 (when it is available).
      """
      if has_flag(compiler, "-std=c++14"):
          return "-std=c++14"
      elif has_flag(compiler, "-std=c++11"):
          return "-std=c++11"
      else:
          raise RuntimeError(
              "Unsupported compiler -- at least C++11 support "
              "is needed!"
          )
  
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 2 for calling a global function with example usage: cpp_flag(compiler) and returns: str, str