code: def is_gpu_available():
      """Determine if GPUs are available on the host"""
      try:
          subprocess.check_output(["nvidia-smi", "--list-gpus"])
          return True
      except Exception:
          return False
  
file_path: TensorFlowOnSpark/tensorflowonspark/gpu_info.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import nested_scopes
  from __future__ import print_function
  import logging
  import random
  import subprocess
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: is_gpu_available() and returns: True, False