code: def check_mathlib(config_cmd):
      # Testing the C math library
      mathlibs = []
      mathlibs_choices = [[], ["m"], ["cpml"]]
      mathlib = os.environ.get("MATHLIB")
      if mathlib:
          mathlibs_choices.insert(0, mathlib.split(","))
      for libs in mathlibs_choices:
          if config_cmd.check_func(
              "exp", libraries=libs, decl=True, call=True
          ):
              mathlibs = libs
              break
      else:
          raise EnvironmentError(
              "math library missing; rerun "
              "setup.py after setting the "
              "MATHLIB env variable"
          )
      return mathlibs
  
imports: from __future__ import division, print_function
  import os
  import sys
  import pickle
  import copy
  import warnings
  import platform
  from os.path import join
  from numpy.distutils import log
  from distutils.dep_util import newer
  from distutils.sysconfig import get_config_var
  from numpy._build_utils.apple_accelerate import uses_accelerate_framework, get_sgemv_fix
  from numpy.compat import npy_load_module
  from setup_common import *
label_desc: Use image node_id 9 for calling a global function with example usage: check_mathlib(config_cmd) and returns: mathlibs