code: def try_get_info(f, h, default="N/A"):
      try:
          v = f(h)
      except py3nvml.NVMLError_NotSupported:
          v = default
      return v
  
file_path: py3nvml/py3nvml/utils.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import logging
  import os
  import warnings
  from py3nvml import py3nvml
label_desc: Use image node_id 2 for calling a global function with example usage: try_get_info(f, h, default) and returns: v