code: def isNaN_or_Inf_or_None(x):
      isNone = x is None
      try:
          isNaN = np.isnan(x)
          isInf = np.isinf(x)
          isStr = isinstance(x, str)
      except Exception:
          isNaN = False
          isInf = False
          isStr = False
      if not isNaN and not isInf:
          try:
              val = get_underlying_scalar_constant_value(x)
              isInf = np.isinf(val)
              isNaN = np.isnan(val)
          except Exception:
              isNaN = False
              isInf = False
      if isinstance(x, Constant) and isinstance(x.data, str):
          isStr = True
      else:
          isStr = False
      return isNone or isNaN or isInf or isStr
  
imports: import warnings
  import numpy
  import pytensor.tensor
  from pytensor.compile.function.pfunc import construct_pfunc_ins_and_outs
  from pytensor.compile.sharedvalue import SharedVariable, collect_new_shareds
  from pytensor.configdefaults import config
  from pytensor.graph.basic import Constant, Variable, graph_inputs
  from pytensor.graph.op import get_test_value
  from pytensor.graph.replace import clone_replace
  from pytensor.graph.utils import MissingInputError, TestValueError
  from pytensor.scan.op import Scan, ScanInfo
  from pytensor.scan.utils import expand_empty, safe_new, until
  from pytensor.tensor.basic import get_underlying_scalar_constant_value
  from pytensor.tensor.exceptions import NotScalarConstantError
  from pytensor.tensor.math import minimum
  from pytensor.tensor.shape import shape_padleft, unbroadcast
  from pytensor.tensor.type import TensorType, integer_dtypes
  from pytensor.updates import OrderedUpdates
label_desc: Use image node_id 2 for calling a global function with example usage: isNaN_or_Inf_or_None(x) and returns: unknown