code: def cntk_check_libs():
      WARNING_MSG = "\n\n" + ("#" * 48)
      WARNING_MSG += " Missing optional dependency (%s) "
      WARNING_MSG += "#" * 48
      WARNING_MSG += "\n   CNTK may crash if the component that depends on those dependencies is loaded."
      WARNING_MSG += "\n   Visit %s for more information."
      WARNING_MSG += "\n" + ("#" * 140) + "\n"
      WARNING_MSG_GPU_ONLY = WARNING_MSG[:-1]
      WARNING_MSG_GPU_ONLY += "\nIf you intend to use CNTK without GPU support, you can ignore the (likely) GPU-specific warning!"
      WARNING_MSG_GPU_ONLY += "\n" + ("#" * 140) + "\n"
  
      devnull = open(os.devnull, "w")
      __my_system__ = platform.system().lower()
      if __my_system__ == "windows":
          if (
              call(
                  ["where", "libiomp5md*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  ["where", "mklml*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG
                  % (
                      "    MKL     ",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Python#mkl",
                  )
              )
          if (
              call(
                  ["where", "cudnn*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  ["where", "nvml*.dll"], stdout=devnull, stderr=devnull
              )
              != 0
              or call(
                  ["where", "nvml*.dll"], stdout=devnull, stderr=devnull
              )
              != 0
              or call(
                  ["where", "cublas*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  ["where", "cudart*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  ["where", "curand*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  ["where", "cusparse*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG_GPU_ONLY
                  % (
                      "GPU-Specific",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Python#optional-gpu-specific-packages",
                  )
              )
          if (
              call(
                  ["where", "opencv_world*.dll"],
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG
                  % (
                      "   OpenCV   ",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Python#optional-opencv",
                  )
              )
      elif __my_system__ == "linux":
          if (
              call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libmklml_intel*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libiomp5*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG
                  % (
                      "    MKL     ",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#mkl",
                  )
              )
          if (
              call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcudart*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcublas*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcurand*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcusparse*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcuda*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libnvidia-ml*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libcudnn*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG_GPU_ONLY
                  % (
                      "GPU-Specific",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#optional-gpu-specific-packages",
                  )
              )
          if (
              call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_core*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_imgproc*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
              or call(
                  'ldconfig -N -v $(sed "s/:/ /g" <<< $LD_LIBRARY_PATH) | grep libopencv_imgcodecs*.so*',
                  shell=True,
                  executable="/bin/bash",
                  stdout=devnull,
                  stderr=devnull,
              )
              != 0
          ):
              warnings.warn(
                  WARNING_MSG
                  % (
                      "   OpenCV   ",
                      "https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python#optional-opencv",
                  )
              )
      devnull.close()
  
file_path: CNTK/bindings/python/cntk/cntk_py_init.py
imports: import sys
  import os
  import platform
  import linecache
  import warnings
  from subprocess import call
label_desc: Use image node_id 2 for calling a global function with example usage: cntk_check_libs() without return types