code: def safe_scalar_isnan(x):
      try:
          return np.isnan(float(x))
      except (TypeError, ValueError, NotImplementedError):
          return False
  
imports: import sys
  import numpy
  import six
  from six.moves import cStringIO
  from .compat import optional_dep_ok
label_desc: Use image node_id 18 for calling a global function with example usage: safe_scalar_isnan(x) and returns: np, False