code: def isNaN_or_Inf_or_None(x):
      isNone = x is None
      try:
          isNaN = np.isnan(x)
          isInf = np.isinf(x)
          isStr = isinstance(x, string_types)
      except Exception:
          isNaN = False
          isInf = False
          isStr = False
      if not isNaN and not isInf:
          try:
              val = get_scalar_constant_value(x)
              isInf = np.isinf(val)
              isNaN = np.isnan(val)
          except Exception:
              isNaN = False
              isInf = False
      if isinstance(x, gof.Constant) and isinstance(
          x.data, string_types
      ):
          isStr = True
      else:
          isStr = False
      return isNone or isNaN or isInf or isStr
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import logging
  import warnings
  from collections import OrderedDict
  import numpy
  import theano
  from theano.compat import izip
  from six import string_types, iteritems
  from six.moves import xrange
  from theano.compile.pfunc import rebuild_collect_shared
  from theano import gof, compat
  from theano import tensor, scalar
  from theano.tensor.basic import get_scalar_constant_value
label_desc: Use image node_id 8 for calling a global function with example usage: isNaN_or_Inf_or_None(x) and returns: unknown