code: def _numpy_to_python(obj):
      """Convert an nested dict/list/tuple that might contain numpy objects
      to their python equivalents. Return converted object.
      """
      if isinstance(obj, dict):
          return {k: _numpy_to_python(v) for k, v in obj.items()}
      elif isinstance(obj, (list, tuple, np.ndarray)):
          return [_numpy_to_python(x) for x in obj]
      elif isinstance(obj, FormattedFeatureName):
          return obj.value
      elif isinstance(obj, _numpy_string_types):
          return six.text_type(obj)
      elif hasattr(obj, "dtype") and np.isscalar(obj):
          if np.issubdtype(obj, np.floating):
              return float(obj)
          elif np.issubdtype(obj, np.integer):
              return int(obj)
          elif np.issubdtype(obj, np.bool_):
              return bool(obj)
      return obj
  
imports: import six
  import attr
  import numpy
  from .features import FormattedFeatureName
label_desc: Use image node_id 2 for calling a global function with example usage: _numpy_to_python(obj) and returns: obj, unknown, unknown, obj, six, float, int, bool